mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-11 06:44:34 -05:00
[skip ci] Formatting
This commit is contained in:
@@ -4,20 +4,12 @@ import suwayomi.tachidesk.manga.impl.download.fileProvider.impl.ThumbnailFilePro
|
||||
import java.io.InputStream
|
||||
|
||||
object ThumbnailDownloadHelper {
|
||||
fun getImage(mangaId: Int): Pair<InputStream, String> {
|
||||
return provider(mangaId).getImage().execute()
|
||||
}
|
||||
fun getImage(mangaId: Int): Pair<InputStream, String> = provider(mangaId).getImage().execute()
|
||||
|
||||
fun delete(mangaId: Int): Boolean {
|
||||
return provider(mangaId).delete()
|
||||
}
|
||||
fun delete(mangaId: Int): Boolean = provider(mangaId).delete()
|
||||
|
||||
suspend fun download(mangaId: Int): Boolean {
|
||||
return provider(mangaId).download().execute()
|
||||
}
|
||||
suspend fun download(mangaId: Int): Boolean = provider(mangaId).download().execute()
|
||||
|
||||
// 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(mangaId: Int): ThumbnailFileProvider {
|
||||
return ThumbnailFileProvider(mangaId)
|
||||
}
|
||||
private fun provider(mangaId: Int): ThumbnailFileProvider = ThumbnailFileProvider(mangaId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user