|
@@ -20,7 +20,6 @@ import eu.kanade.tachiyomi.source.model.Page
|
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
|
import eu.kanade.tachiyomi.source.online.fetchAllImageUrlsFromPageList
|
|
import eu.kanade.tachiyomi.source.online.fetchAllImageUrlsFromPageList
|
|
import eu.kanade.tachiyomi.util.lang.RetryWithDelay
|
|
import eu.kanade.tachiyomi.util.lang.RetryWithDelay
|
|
-import eu.kanade.tachiyomi.util.lang.plusAssign
|
|
|
|
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
|
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
|
import eu.kanade.tachiyomi.util.storage.DiskUtil.NOMEDIA_FILE
|
|
import eu.kanade.tachiyomi.util.storage.DiskUtil.NOMEDIA_FILE
|
|
import eu.kanade.tachiyomi.util.storage.saveTo
|
|
import eu.kanade.tachiyomi.util.storage.saveTo
|
|
@@ -30,6 +29,7 @@ import logcat.LogPriority
|
|
import nl.adaptivity.xmlutil.serialization.XML
|
|
import nl.adaptivity.xmlutil.serialization.XML
|
|
import okhttp3.Response
|
|
import okhttp3.Response
|
|
import rx.Observable
|
|
import rx.Observable
|
|
|
|
+import rx.Subscription
|
|
import rx.android.schedulers.AndroidSchedulers
|
|
import rx.android.schedulers.AndroidSchedulers
|
|
import rx.schedulers.Schedulers
|
|
import rx.schedulers.Schedulers
|
|
import rx.subscriptions.CompositeSubscription
|
|
import rx.subscriptions.CompositeSubscription
|
|
@@ -637,6 +637,8 @@ class Downloader(
|
|
return queue.none { it.status.value <= Download.State.DOWNLOADING.value }
|
|
return queue.none { it.status.value <= Download.State.DOWNLOADING.value }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private operator fun CompositeSubscription.plusAssign(subscription: Subscription) = add(subscription)
|
|
|
|
+
|
|
companion object {
|
|
companion object {
|
|
const val TMP_DIR_SUFFIX = "_tmp"
|
|
const val TMP_DIR_SUFFIX = "_tmp"
|
|
const val WARNING_NOTIF_TIMEOUT_MS = 30_000L
|
|
const val WARNING_NOTIF_TIMEOUT_MS = 30_000L
|