From 0d8276040f255d44d824abb9813badfb3417c12e Mon Sep 17 00:00:00 2001 From: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:06:21 +0700 Subject: [PATCH] feat: Re-enable fetching chapters list for entries with licenced --- .../tachiyomi/source/online/HttpSource.kt | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/source/api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt b/source/api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt index 78c390d2d3..05494e6062 100644 --- a/source/api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt +++ b/source/api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt @@ -251,28 +251,19 @@ abstract class HttpSource : CatalogueSource { * * @param manga the manga to update. * @return the chapters for the manga. - * @throws LicensedMangaChaptersException if a manga is licensed and therefore no chapters are available. */ @Suppress("DEPRECATION") override suspend fun getChapterList(manga: SManga): List { - if (manga.status == SManga.LICENSED) { - throw LicensedMangaChaptersException() - } - return fetchChapterList(manga).awaitSingle() } @Deprecated("Use the non-RxJava API instead", replaceWith = ReplaceWith("getChapterList")) override fun fetchChapterList(manga: SManga): Observable> { - return if (manga.status != SManga.LICENSED) { - client.newCall(chapterListRequest(manga)) - .asObservableSuccess() - .map { response -> - chapterListParse(response) - } - } else { - Observable.error(LicensedMangaChaptersException()) - } + return client.newCall(chapterListRequest(manga)) + .asObservableSuccess() + .map { response -> + chapterListParse(response) + } } /** @@ -503,5 +494,3 @@ abstract class HttpSource : CatalogueSource { */ override fun getFilterList() = FilterList() } - -class LicensedMangaChaptersException : Exception("Licensed - No chapters to show")