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)'
pkgNameSuffix = 'all.mmrcms'
extClass = '.MyMangaReaderCMSSources'
extVersionCode = 8
extVersionSuffix = 8
extVersionCode = 9
extVersionSuffix = 9
libVersion = '1.2'
}

View File

@ -41,6 +41,7 @@ class MyMangaReaderCMSSource(override val lang: String,
}
return GET(url.toString())
}
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/filterList?page=$page&sortBy=last_release&asc=false")
override fun popularMangaParse(response: Response) = internalMangaParse(response)
@ -63,6 +64,7 @@ class MyMangaReaderCMSSource(override val lang: String,
internalMangaParse(response)
}
}
override fun latestUpdatesParse(response: Response) = internalMangaParse(response)
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")
// 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"
}
}
@ -218,8 +220,7 @@ class MyMangaReaderCMSSource(override val lang: String,
return chapter
}
override fun pageListParse(response: Response)
= response.asJsoup().select("#all > .img-responsive")
override fun pageListParse(response: Response) = response.asJsoup().select("#all > .img-responsive")
.mapIndexed { i, e ->
var url = e.attr("data-src")
@ -232,8 +233,7 @@ class MyMangaReaderCMSSource(override val lang: String,
Page(i, url, url)
}
override fun imageUrlParse(response: Response)
= throw UnsupportedOperationException("Unused method called!")
override fun imageUrlParse(response: Response) = throw UnsupportedOperationException("Unused method called!")
private fun getInitialFilterList() = listOf<Filter<*>>(
Filter.Header("NOTE: Ignored if using text search!"),