Myreadingmanga Fix Chapter Titles (#8838)
* Bump Extension Version Code * Bump User Agent Version * Remove Chapter Name Logic Deprecated: Source no longer provides table of contents with chapter names. * Update Chapter Name Chapter list based on page list number and not true chapter number.
This commit is contained in:
parent
377e2124f1
commit
4fbe372043
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'MyReadingManga'
|
extName = 'MyReadingManga'
|
||||||
extClass = '.MyReadingMangaFactory'
|
extClass = '.MyReadingMangaFactory'
|
||||||
extVersionCode = 57
|
extVersionCode = 58
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,10 +194,8 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||||||
|
|
||||||
val date = parseDate(document.select(".entry-time").text())
|
val date = parseDate(document.select(".entry-time").text())
|
||||||
val mangaUrl = document.baseUri()
|
val mangaUrl = document.baseUri()
|
||||||
val chfirstname = document.select(".chapter-class a[href*=$mangaUrl]").first()?.text()?.ifEmpty { "Ch. 1" }?.replaceFirstChar { it.titlecase() }
|
|
||||||
?: "Ch. 1"
|
|
||||||
// create first chapter since its on main manga page
|
// create first chapter since its on main manga page
|
||||||
chapters.add(createChapter("1", document.baseUri(), date, chfirstname))
|
chapters.add(createChapter("1", document.baseUri(), date, "Part 1"))
|
||||||
// see if there are multiple chapters or not
|
// see if there are multiple chapters or not
|
||||||
val lastChapterNumber = document.select(chapterListSelector()).last()?.text()
|
val lastChapterNumber = document.select(chapterListSelector()).last()?.text()
|
||||||
if (lastChapterNumber != null) {
|
if (lastChapterNumber != null) {
|
||||||
@ -205,7 +203,7 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||||||
// so we take the last one and loop it to get all hidden ones.
|
// so we take the last one and loop it to get all hidden ones.
|
||||||
// Example: 1 2 3 4 .. 7 8 9 Next
|
// Example: 1 2 3 4 .. 7 8 9 Next
|
||||||
for (i in 2..lastChapterNumber.toInt()) {
|
for (i in 2..lastChapterNumber.toInt()) {
|
||||||
chapters.add(createChapter(i.toString(), document.baseUri(), date, "Ch. $i"))
|
chapters.add(createChapter(i.toString(), document.baseUri(), date, "Part $i"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chapters.reverse()
|
chapters.reverse()
|
||||||
@ -340,7 +338,7 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val USER_AGENT = "Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36"
|
private const val USER_AGENT = "Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36"
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun randomString(length: Int): String {
|
private fun randomString(length: Int): String {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user