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:
happywillow0 2025-05-15 11:25:25 -04:00 committed by Draff
parent 377e2124f1
commit 4fbe372043
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 4 additions and 6 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'MyReadingManga'
extClass = '.MyReadingMangaFactory'
extVersionCode = 57
extVersionCode = 58
isNsfw = true
}

View File

@ -194,10 +194,8 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
val date = parseDate(document.select(".entry-time").text())
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
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
val lastChapterNumber = document.select(chapterListSelector()).last()?.text()
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.
// Example: 1 2 3 4 .. 7 8 9 Next
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()
@ -340,7 +338,7 @@ open class MyReadingManga(override val lang: String, private val siteLang: Strin
}
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 {