[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'
|
||||
pkgNameSuffix = 'ru.remanga'
|
||||
extClass = '.Remanga'
|
||||
extVersionCode = 32
|
||||
extVersionCode = 33
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import GenresDto
|
|||
import LibraryDto
|
||||
import MangaDetDto
|
||||
import PageDto
|
||||
import ChunksPageDto
|
||||
import PageWrapperDto
|
||||
import PaidPageDto
|
||||
import SeriesWrapperDto
|
||||
import UserDto
|
||||
import android.annotation.SuppressLint
|
||||
|
@ -350,11 +350,11 @@ class Remanga : ConfigurableSource, HttpSource() {
|
|||
val body = response.body?.string()!!
|
||||
return try {
|
||||
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)
|
||||
}
|
||||
} catch (e: SerializationException) {
|
||||
val page = json.decodeFromString<SeriesWrapperDto<PaidPageDto>>(body)
|
||||
val page = json.decodeFromString<SeriesWrapperDto<ChunksPageDto>>(body)
|
||||
val result = mutableListOf<Page>()
|
||||
page.content.pages.forEach {
|
||||
it.filter { page -> page.height > 10 }.forEach { page ->
|
||||
|
|
|
@ -101,20 +101,12 @@ data class PageDto(
|
|||
val pages: List<PagesDto>
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ChunksPageDto(
|
||||
val pages: List<List<PagesDto>>
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UserDto(
|
||||
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