fix v2 api call for groups

(cherry picked from commit 01903e341be6cd5ae50ce6eee88be6ad40fd1835)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/ApiMangaParser.kt
This commit is contained in:
Carlos 2020-12-13 11:02:08 -05:00 committed by Jobobby04
parent f1a65edd3a
commit c073f71ec1
2 changed files with 8 additions and 2 deletions

View File

@ -230,7 +230,7 @@ class ApiMangaParser(private val langs: List<String>) {
val networkApiManga = MdUtil.jsonParser.decodeFromString<ApiMangaSerializer>(jsonData)
val networkManga = networkApiManga.data.manga
val networkChapters = networkApiManga.data.chapters
val groups = networkApiManga.data.groups
val groups = networkApiManga.data.groups.map { it.id to it.name }.toMap()
val status = networkManga.publication!!.status

View File

@ -12,7 +12,7 @@ data class ApiMangaSerializer(
data class DataSerializer(
val manga: MangaSerializer,
val chapters: List<ChapterSerializer>,
val groups: Map<Long, String>,
val groups: List<GroupSerializer>,
)
@ -68,3 +68,9 @@ data class ChapterSerializer(
val groups: List<Long>,
val timestamp: Long
)
@Serializable
data class GroupSerializer(
val id: Long,
val name: String
)