Support getMangaUrl and getChapterUrl for delegated sources
This commit is contained in:
parent
304e3560fa
commit
beb28b86ac
@ -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].
|
||||
|
@ -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].
|
||||
|
Loading…
x
Reference in New Issue
Block a user