[RU]Remanga change/refix "single pixel" filter (#8168)
* [RU]Remanga change/refix "single pixel" filter * move minor
This commit is contained in:
parent
b87a5935b8
commit
7e9ca28ae0
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Remanga'
|
extName = 'Remanga'
|
||||||
pkgNameSuffix = 'ru.remanga'
|
pkgNameSuffix = 'ru.remanga'
|
||||||
extClass = '.Remanga'
|
extClass = '.Remanga'
|
||||||
extVersionCode = 32
|
extVersionCode = 33
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import GenresDto
|
||||||
import LibraryDto
|
import LibraryDto
|
||||||
import MangaDetDto
|
import MangaDetDto
|
||||||
import PageDto
|
import PageDto
|
||||||
|
import ChunksPageDto
|
||||||
import PageWrapperDto
|
import PageWrapperDto
|
||||||
import PaidPageDto
|
|
||||||
import SeriesWrapperDto
|
import SeriesWrapperDto
|
||||||
import UserDto
|
import UserDto
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
@ -350,11 +350,11 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
val body = response.body?.string()!!
|
val body = response.body?.string()!!
|
||||||
return try {
|
return try {
|
||||||
val page = json.decodeFromString<SeriesWrapperDto<PageDto>>(body)
|
val page = json.decodeFromString<SeriesWrapperDto<PageDto>>(body)
|
||||||
page.content.pages.filter { it.height > 1 }.map {
|
page.content.pages.filter { it.height > 10 }.map {
|
||||||
Page(it.page, "", it.link)
|
Page(it.page, "", it.link)
|
||||||
}
|
}
|
||||||
} catch (e: SerializationException) {
|
} catch (e: SerializationException) {
|
||||||
val page = json.decodeFromString<SeriesWrapperDto<PaidPageDto>>(body)
|
val page = json.decodeFromString<SeriesWrapperDto<ChunksPageDto>>(body)
|
||||||
val result = mutableListOf<Page>()
|
val result = mutableListOf<Page>()
|
||||||
page.content.pages.forEach {
|
page.content.pages.forEach {
|
||||||
it.filter { page -> page.height > 10 }.forEach { page ->
|
it.filter { page -> page.height > 10 }.forEach { page ->
|
||||||
|
|
|
@ -101,20 +101,12 @@ data class PageDto(
|
||||||
val pages: List<PagesDto>
|
val pages: List<PagesDto>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ChunksPageDto(
|
||||||
|
val pages: List<List<PagesDto>>
|
||||||
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class UserDto(
|
data class UserDto(
|
||||||
val access_token: String
|
val access_token: String
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class PaidPagesDto(
|
|
||||||
val id: Long,
|
|
||||||
val link: String,
|
|
||||||
val height: Int,
|
|
||||||
val page: Int
|
|
||||||
)
|
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class PaidPageDto(
|
|
||||||
val pages: List<List<PaidPagesDto>>
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue