diff --git a/source-api/src/main/java/exh/source/DelegatedHttpSource.kt b/source-api/src/main/java/exh/source/DelegatedHttpSource.kt index d14c1d05a..ce3802252 100644 --- a/source-api/src/main/java/exh/source/DelegatedHttpSource.kt +++ b/source-api/src/main/java/exh/source/DelegatedHttpSource.kt @@ -276,6 +276,30 @@ abstract class DelegatedHttpSource(val delegate: HttpSource) : HttpSource() { return delegate.getImage(page) } + /** + * Returns the url of the provided manga + * + * @since extensions-lib 1.4 + * @param manga the manga + * @return url of the manga + */ + override fun getMangaUrl(manga: SManga): String { + ensureDelegateCompatible() + return delegate.getMangaUrl(manga) + } + + /** + * Returns the url of the provided chapter + * + * @since extensions-lib 1.4 + * @param chapter the chapter + * @return url of the chapter + */ + override fun getChapterUrl(chapter: SChapter): String { + ensureDelegateCompatible() + return delegate.getChapterUrl(chapter) + } + /** * Called before inserting a new chapter into database. Use it if you need to override chapter * fields, like the title or the chapter number. Do not change anything to [manga]. diff --git a/source-api/src/main/java/exh/source/EnhancedHttpSource.kt b/source-api/src/main/java/exh/source/EnhancedHttpSource.kt index b0ce7d34f..43dc38dcf 100644 --- a/source-api/src/main/java/exh/source/EnhancedHttpSource.kt +++ b/source-api/src/main/java/exh/source/EnhancedHttpSource.kt @@ -240,6 +240,24 @@ class EnhancedHttpSource( */ override suspend fun getImage(page: Page) = source().getImage(page) + /** + * Returns the url of the provided manga + * + * @since extensions-lib 1.4 + * @param manga the manga + * @return url of the manga + */ + override fun getMangaUrl(manga: SManga) = source().getMangaUrl(manga) + + /** + * Returns the url of the provided chapter + * + * @since extensions-lib 1.4 + * @param chapter the chapter + * @return url of the chapter + */ + override fun getChapterUrl(chapter: SChapter) = source().getChapterUrl(chapter) + /** * Called before inserting a new chapter into database. Use it if you need to override chapter * fields, like the title or the chapter number. Do not change anything to [manga].