diff --git a/src/all/fmreader/build.gradle b/src/all/fmreader/build.gradle index d8e4058d3..1ff15f0d7 100644 --- a/src/all/fmreader/build.gradle +++ b/src/all/fmreader/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: FMReader (multiple aggregators)' pkgNameSuffix = 'all.fmreader' extClass = '.FMReaderFactory' - extVersionCode = 8 + extVersionCode = 9 libVersion = '1.2' } diff --git a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt index 4662e1521..26a0b555b 100644 --- a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt +++ b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt @@ -96,6 +96,8 @@ class ReadComicOnlineOrg : FMReader("ReadComicOnline.org", "https://readcomiconl class HanaScan : FMReader("HanaScan (RawQQ)", "https://hanascan.com", "ja") { override fun popularMangaNextPageSelector() = "div.col-md-8 button" + // Referer header needs to be chapter URL or not set at all + override fun imageRequest(page: Page): Request = GET(page.imageUrl!!, headersBuilder().removeAll("Referer").build()) } class RawLH : FMReader("RawLH", "https://loveheaven.net", "ja") { @@ -166,16 +168,12 @@ class MangaTR : FMReader("Manga-TR", "https://manga-tr.com", "tr") { override val chapterTimeSelector = "td[align=right]" private val chapterListHeaders = headers.newBuilder().add("X-Requested-With", "XMLHttpRequest").build() override fun fetchChapterList(manga: SManga): Observable> { - return if (manga.status != SManga.LICENSED) { - val requestUrl = "$baseUrl/cek/fetch_pages_manga.php?manga_cek=${manga.url.substringAfter("manga-").substringBefore(".")}" - client.newCall(GET(requestUrl, chapterListHeaders)) - .asObservableSuccess() - .map { response -> - chapterListParse(response, requestUrl) - } - } else { - Observable.error(Exception("Licensed - No chapters to show")) - } + val requestUrl = "$baseUrl/cek/fetch_pages_manga.php?manga_cek=${manga.url.substringAfter("manga-").substringBefore(".")}" + return client.newCall(GET(requestUrl, chapterListHeaders)) + .asObservableSuccess() + .map { response -> + chapterListParse(response, requestUrl) + } } private fun chapterListParse(response: Response, requestUrl: String): List { @@ -201,16 +199,6 @@ class MangaTR : FMReader("Manga-TR", "https://manga-tr.com", "tr") { } override fun pageListRequest(chapter: SChapter): Request = GET("$baseUrl/${chapter.url.substringAfter("cek/")}", headers) - override fun pageListParse(document: Document): List { - val pages = mutableListOf() - - document.select("div.chapter-content select:first-of-type option").forEachIndexed { i, imgPage -> - pages.add(Page(i, "$baseUrl/${imgPage.attr("value")}")) - } - return pages.dropLast(1) // last page is a comments page - } - - override fun imageUrlParse(document: Document): String = document.select("img.chapter-img").attr("abs:src").trim() } class Comicastle : FMReader("Comicastle", "https://www.comicastle.org", "en") {