[Mangadex] Adding Langauge to genres (#2323)

[MangaDex] Adding Manga language to list of genres
This commit is contained in:
Jays2Kings 2020-03-01 02:58:47 -08:00 committed by GitHub
parent b1a291fae9
commit 24bb1c5474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MangaDex' appName = 'Tachiyomi: MangaDex'
pkgNameSuffix = 'all.mangadex' pkgNameSuffix = 'all.mangadex'
extClass = '.MangadexFactory' extClass = '.MangadexFactory'
extVersionCode = 83 extVersionCode = 84
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -395,7 +395,8 @@ abstract class Mangadex(
} }
val genres = (if (mangaJson.get("hentai").int == 1) listOf("Hentai") else listOf()) + val genres = (if (mangaJson.get("hentai").int == 1) listOf("Hentai") else listOf()) +
mangaJson.get("genres").asJsonArray.mapNotNull { GENRES[it.toString()] } mangaJson.get("genres").asJsonArray.mapNotNull { GENRES[it.toString()] } +
mangaJson.get("lang_name").string
manga.genre = genres.joinToString(", ") manga.genre = genres.joinToString(", ")
return manga return manga