mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
commit
0b34547365
@ -102,15 +102,12 @@ class DownloadService : Service() {
|
|||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
// Fetching the download id received with the broadcast
|
// Fetching the download id received with the broadcast
|
||||||
// Checking if the received broadcast is for our enqueued download by matching download id
|
// Checking if the received broadcast is for our enqueued download by matching download id
|
||||||
when (
|
val downloadId = intent.getLongExtra(
|
||||||
intent.getLongExtra(
|
DownloadManager.EXTRA_DOWNLOAD_ID,
|
||||||
DownloadManager.EXTRA_DOWNLOAD_ID,
|
-1
|
||||||
-1
|
)
|
||||||
)
|
if (downloadId == audioDownloadId) audioDownloadId = null
|
||||||
) {
|
else if (downloadId == videoDownloadId) videoDownloadId = null
|
||||||
videoDownloadId -> videoDownloadId = null
|
|
||||||
audioDownloadId -> audioDownloadId = null
|
|
||||||
}
|
|
||||||
|
|
||||||
if (audioDownloadId != null || videoDownloadId != null) return
|
if (audioDownloadId != null || videoDownloadId != null) return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user