[RU]Remanga latestUpdates quality covers & status 1.3 (#12157)
This commit is contained in:
parent
cbded92086
commit
a561eaa219
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Remanga'
|
extName = 'Remanga'
|
||||||
pkgNameSuffix = 'ru.remanga'
|
pkgNameSuffix = 'ru.remanga'
|
||||||
extClass = '.Remanga'
|
extClass = '.Remanga'
|
||||||
extVersionCode = 49
|
extVersionCode = 50
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -8,7 +8,6 @@ import MangaDetDto
|
||||||
import MyLibraryDto
|
import MyLibraryDto
|
||||||
import PageDto
|
import PageDto
|
||||||
import PageWrapperDto
|
import PageWrapperDto
|
||||||
import PageWrapperDtoNoLimit
|
|
||||||
import SeriesWrapperDto
|
import SeriesWrapperDto
|
||||||
import TagsDto
|
import TagsDto
|
||||||
import UserDto
|
import UserDto
|
||||||
|
@ -122,15 +121,9 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
override fun popularMangaParse(response: Response): MangasPage = searchMangaParse(response)
|
override fun popularMangaParse(response: Response): MangasPage = searchMangaParse(response)
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/api/titles/last-chapters/?page=$page&count=$count", headers)
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/api/search/catalog/?ordering=-chapter_date&count=$count&page=$page", headers)
|
||||||
|
|
||||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
override fun latestUpdatesParse(response: Response): MangasPage = searchMangaParse(response)
|
||||||
val page = json.decodeFromString<PageWrapperDtoNoLimit<LibraryDto>>(response.body!!.string())
|
|
||||||
val mangas = page.content.map {
|
|
||||||
it.toSManga()
|
|
||||||
}
|
|
||||||
return MangasPage(mangas, mangas.isNotEmpty())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun searchMangaParse(response: Response): MangasPage {
|
override fun searchMangaParse(response: Response): MangasPage {
|
||||||
if (response.request.url.toString().contains("/bookmarks/")) {
|
if (response.request.url.toString().contains("/bookmarks/")) {
|
||||||
|
@ -233,11 +226,12 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
private fun parseStatus(status: Int): Int {
|
private fun parseStatus(status: Int): Int {
|
||||||
return when (status) {
|
return when (status) {
|
||||||
0 -> SManga.COMPLETED
|
0 -> SManga.COMPLETED // Закончен
|
||||||
1 -> SManga.ONGOING
|
1 -> SManga.ONGOING // Продолжается
|
||||||
2 -> SManga.ONGOING
|
2 -> SManga.ON_HIATUS // Заморожен
|
||||||
3 -> SManga.ONGOING
|
3 -> SManga.ON_HIATUS // Нет переводчика
|
||||||
5 -> SManga.LICENSED
|
4 -> SManga.ONGOING // Анонс
|
||||||
|
5 -> SManga.LICENSED // Лицензировано
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,11 +71,6 @@ data class PageWrapperDto<T>(
|
||||||
val props: PropsDto
|
val props: PropsDto
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
|
||||||
data class PageWrapperDtoNoLimit<T>(
|
|
||||||
val content: List<T>
|
|
||||||
)
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SeriesWrapperDto<T>(
|
data class SeriesWrapperDto<T>(
|
||||||
val content: T
|
val content: T
|
||||||
|
|
Loading…
Reference in New Issue