mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 18:39:19 +01:00
Anilist/Kitsu Fixes
This commit is contained in:
parent
2c6f64c5ae
commit
d09eca7833
@ -51,6 +51,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
|||||||
.map { list ->
|
.map { list ->
|
||||||
list.filter { it.type != "Novel" }.map { it.toTrack() }
|
list.filter { it.type != "Novel" }.map { it.toTrack() }
|
||||||
}
|
}
|
||||||
|
.onErrorReturn { emptyList() }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getList(username: String): Observable<List<Track>> {
|
fun getList(username: String): Observable<List<Track>> {
|
||||||
|
@ -9,7 +9,7 @@ import eu.kanade.tachiyomi.data.track.TrackManager
|
|||||||
open class KitsuManga(obj: JsonObject) {
|
open class KitsuManga(obj: JsonObject) {
|
||||||
val id by obj.byInt
|
val id by obj.byInt
|
||||||
val canonicalTitle by obj["attributes"].byString
|
val canonicalTitle by obj["attributes"].byString
|
||||||
val chapterCount = obj["attributes"]["chapterCount"].nullInt
|
val chapterCount = obj["attributes"].obj.get("chapterCount").nullInt
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
open fun toTrack() = Track.create(TrackManager.KITSU).apply {
|
open fun toTrack() = Track.create(TrackManager.KITSU).apply {
|
||||||
@ -22,7 +22,7 @@ open class KitsuManga(obj: JsonObject) {
|
|||||||
class KitsuLibManga(obj: JsonObject, manga: JsonObject) : KitsuManga(manga) {
|
class KitsuLibManga(obj: JsonObject, manga: JsonObject) : KitsuManga(manga) {
|
||||||
val remoteId by obj.byInt("id")
|
val remoteId by obj.byInt("id")
|
||||||
val status by obj["attributes"].byString
|
val status by obj["attributes"].byString
|
||||||
val rating = obj["attributes"]["rating"].nullString
|
val rating = obj["attributes"].obj.get("rating").nullString
|
||||||
val progress by obj["attributes"].byInt
|
val progress by obj["attributes"].byInt
|
||||||
|
|
||||||
override fun toTrack() = super.toTrack().apply {
|
override fun toTrack() = super.toTrack().apply {
|
||||||
|
Loading…
Reference in New Issue
Block a user