mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-10 06:14:35 -05:00
[skip ci] Formatting
This commit is contained in:
@@ -16,16 +16,12 @@ object ChapterDownloadHelper {
|
||||
mangaId: Int,
|
||||
chapterId: Int,
|
||||
index: Int,
|
||||
): Pair<InputStream, String> {
|
||||
return provider(mangaId, chapterId).getImage().execute(index)
|
||||
}
|
||||
): Pair<InputStream, String> = provider(mangaId, chapterId).getImage().execute(index)
|
||||
|
||||
fun delete(
|
||||
mangaId: Int,
|
||||
chapterId: Int,
|
||||
): Boolean {
|
||||
return provider(mangaId, chapterId).delete()
|
||||
}
|
||||
): Boolean = provider(mangaId, chapterId).delete()
|
||||
|
||||
suspend fun download(
|
||||
mangaId: Int,
|
||||
@@ -33,9 +29,7 @@ object ChapterDownloadHelper {
|
||||
download: DownloadChapter,
|
||||
scope: CoroutineScope,
|
||||
step: suspend (DownloadChapter?, Boolean) -> Unit,
|
||||
): Boolean {
|
||||
return provider(mangaId, chapterId).download().execute(download, scope, step)
|
||||
}
|
||||
): Boolean = provider(mangaId, chapterId).download().execute(download, scope, step)
|
||||
|
||||
// return the appropriate provider based on how the download was saved. For the logic is simple but will evolve when new types of downloads are available
|
||||
private fun provider(
|
||||
|
||||
Reference in New Issue
Block a user