[mangadex] Use cdndex for cover thumbnails (#823)

[mangadex] Use cdndex for cover thumbnails
This commit is contained in:
Ken Swenson 2019-02-15 19:53:32 -05:00 committed by Carlos
parent 7ff1c2b657
commit b3167bc1a9
2 changed files with 4 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 = 47 extVersionCode = 48
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -30,6 +30,8 @@ open class Mangadex(override val lang: String, private val internalLang: String,
override val baseUrl = "https://mangadex.org" override val baseUrl = "https://mangadex.org"
val cdnUrl = "https://cdndex.com"
override val supportsLatest = true override val supportsLatest = true
private val preferences: SharedPreferences by lazy { private val preferences: SharedPreferences by lazy {
@ -281,7 +283,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
val mangaJson = json.getAsJsonObject("manga") val mangaJson = json.getAsJsonObject("manga")
val chapterJson = json.getAsJsonObject("chapter") val chapterJson = json.getAsJsonObject("chapter")
manga.title = baseUrl + mangaJson.get("title").string manga.title = baseUrl + mangaJson.get("title").string
manga.thumbnail_url = baseUrl + mangaJson.get("cover_url").string manga.thumbnail_url = cdnUrl + mangaJson.get("cover_url").string
manga.description = cleanString(mangaJson.get("description").string) manga.description = cleanString(mangaJson.get("description").string)
manga.author = mangaJson.get("author").string manga.author = mangaJson.get("author").string
manga.artist = mangaJson.get("artist").string manga.artist = mangaJson.get("artist").string