MyReadingManga - fix titles, duplicate pages (#4119)
This commit is contained in:
parent
7a8dfac7a8
commit
767a1ee1fe
|
@ -5,8 +5,9 @@ ext {
|
|||
extName = 'MyReadingManga'
|
||||
pkgNameSuffix = 'all.myreadingmanga'
|
||||
extClass = '.MyReadingMangaFactory'
|
||||
extVersionCode = 38
|
||||
extVersionCode = 39
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -121,7 +121,8 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||
}
|
||||
|
||||
// cleans up the name removing author and language from the title
|
||||
private fun cleanTitle(title: String) = title.substringBeforeLast("[").substringAfterLast("]").substringBeforeLast("(").trim()
|
||||
private val titleRegex = Regex("""\[[^]]*]""")
|
||||
private fun cleanTitle(title: String) = title.replace(titleRegex, "").substringBeforeLast("(").trim()
|
||||
|
||||
private fun cleanAuthor(author: String) = author.substringAfter("[").substringBefore("]").trim()
|
||||
|
||||
|
@ -209,7 +210,9 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
return (document.select("div > img") + document.select("div.separator img[data-src]"))
|
||||
.mapIndexed { i, img -> Page(i, "", getImage(img)) }
|
||||
.map { getImage(it) }
|
||||
.distinct()
|
||||
.mapIndexed { i, url -> Page(i, "", url) }
|
||||
}
|
||||
|
||||
override fun imageUrlParse(document: Document) = throw Exception("Not used")
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package eu.kanade.tachiyomi.extension.all.myreadingmanga
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.source.Source
|
||||
import eu.kanade.tachiyomi.source.SourceFactory
|
||||
|
||||
@Nsfw
|
||||
class MyReadingMangaFactory : SourceFactory {
|
||||
override fun createSources(): List<Source> = languageList.map { MyReadingManga(it.tachiLang, it.siteLang, it.latestLang) }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue