fix covers (#493)

This commit is contained in:
Carlos 2018-09-15 17:28:02 -04:00 committed by GitHub
parent 4dd1719cfc
commit c338b9adc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 23 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: My Manga Reader CMS (Many sources)' appName = 'Tachiyomi: My Manga Reader CMS (Many sources)'
pkgNameSuffix = 'all.mmrcms' pkgNameSuffix = 'all.mmrcms'
extClass = '.MyMangaReaderCMSSources' extClass = '.MyMangaReaderCMSSources'
extVersionCode = 8 extVersionCode = 9
extVersionSuffix = 8 extVersionSuffix = 9
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -41,6 +41,7 @@ class MyMangaReaderCMSSource(override val lang: String,
} }
return GET(url.toString()) return GET(url.toString())
} }
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/filterList?page=$page&sortBy=last_release&asc=false") override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/filterList?page=$page&sortBy=last_release&asc=false")
override fun popularMangaParse(response: Response) = internalMangaParse(response) override fun popularMangaParse(response: Response) = internalMangaParse(response)
@ -63,6 +64,7 @@ class MyMangaReaderCMSSource(override val lang: String,
internalMangaParse(response) internalMangaParse(response)
} }
} }
override fun latestUpdatesParse(response: Response) = internalMangaParse(response) override fun latestUpdatesParse(response: Response) = internalMangaParse(response)
private fun internalMangaParse(response: Response): MangasPage { private fun internalMangaParse(response: Response): MangasPage {
@ -75,7 +77,7 @@ class MyMangaReaderCMSSource(override val lang: String,
thumbnail_url = it.select(".media-left img").attr("src") thumbnail_url = it.select(".media-left img").attr("src")
// Guess thumbnails on broken websites // Guess thumbnails on broken websites
if (thumbnail_url?.isBlank() != false || thumbnail_url?.endsWith("no-image.png") != false) { if (thumbnail_url?.isBlank() != false || thumbnail_url?.endsWith("no-image.png") != false || thumbnail_url?.startsWith("//") != false) {
thumbnail_url = "$baseUrl/uploads/manga/${url.substringAfterLast('/')}/cover/cover_250x350.jpg" thumbnail_url = "$baseUrl/uploads/manga/${url.substringAfterLast('/')}/cover/cover_250x350.jpg"
} }
} }
@ -218,8 +220,7 @@ class MyMangaReaderCMSSource(override val lang: String,
return chapter return chapter
} }
override fun pageListParse(response: Response) override fun pageListParse(response: Response) = response.asJsoup().select("#all > .img-responsive")
= response.asJsoup().select("#all > .img-responsive")
.mapIndexed { i, e -> .mapIndexed { i, e ->
var url = e.attr("data-src") var url = e.attr("data-src")
@ -232,8 +233,7 @@ class MyMangaReaderCMSSource(override val lang: String,
Page(i, url, url) Page(i, url, url)
} }
override fun imageUrlParse(response: Response) override fun imageUrlParse(response: Response) = throw UnsupportedOperationException("Unused method called!")
= throw UnsupportedOperationException("Unused method called!")
private fun getInitialFilterList() = listOf<Filter<*>>( private fun getInitialFilterList() = listOf<Filter<*>>(
Filter.Header("NOTE: Ignored if using text search!"), Filter.Header("NOTE: Ignored if using text search!"),