Make DownloadManager the sole entry point for DownloadService (#9140)
* Rename functions for DownloadService internal use * Call DownloadService.start via DownloadManager * Inline DownloadService.stop into pauseDownloads * Inline DownloadService.stop into clearQueue NotificationReceiver will now also stop the DownloadService when receiving ACTION_CLEAR_DOWNLOADS. * Provide DownloadService.isRunning via DownloadManager
This commit is contained in:
@@ -27,7 +27,6 @@ import eu.kanade.domain.track.model.toDomainTrack
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.cache.CoverCache
|
||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||
import eu.kanade.tachiyomi.data.download.DownloadService
|
||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.data.preference.DEVICE_BATTERY_NOT_LOW
|
||||
import eu.kanade.tachiyomi.data.preference.DEVICE_CHARGING
|
||||
@@ -309,7 +308,7 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
|
||||
if (newUpdates.isNotEmpty()) {
|
||||
notifier.showUpdateNotifications(newUpdates)
|
||||
if (hasDownloads.get()) {
|
||||
DownloadService.start(context)
|
||||
downloadManager.startDownloads()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user