Update MMRCMS (Fix scan-fr.io) (#964)

Update MMRCMS (Fix scan-fr.io)
This commit is contained in:
Amine A 2019-03-23 18:21:00 +01:00 committed by Carlos
parent 45edeff2af
commit 2a8f90b4be
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ 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 = 16 extVersionCode = 17
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -213,7 +213,8 @@ class MyMangaReaderCMSSource(override val lang: String,
/** /**
* Returns the Jsoup selector that returns a list of [Element] corresponding to each chapter. * Returns the Jsoup selector that returns a list of [Element] corresponding to each chapter.
*/ */
fun chapterListSelector() = ".chapters > li:not(.btn)" fun chapterListSelector() = "ul[class^=chapters] > li:not(.btn)"
//Some websites add characters after "chapters" thus the need of checking classes that starts with "chapters"
/** /**
* Returns a chapter from the given element. * Returns a chapter from the given element.
@ -221,7 +222,8 @@ class MyMangaReaderCMSSource(override val lang: String,
* @param element an element obtained from [chapterListSelector]. * @param element an element obtained from [chapterListSelector].
*/ */
private fun nullableChapterFromElement(element: Element): SChapter? { private fun nullableChapterFromElement(element: Element): SChapter? {
val titleWrapper = element.getElementsByClass("chapter-title-rtl").first() val titleWrapper = element.select("[class^=chapter-title-rtl]").first()
//Some websites add characters after "..-rtl" thus the need of checking classes that starts with that
val url = titleWrapper.getElementsByTag("a").attr("href") val url = titleWrapper.getElementsByTag("a").attr("href")
// Ensure chapter actually links to a manga // Ensure chapter actually links to a manga