mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-31 15:47:13 +02:00
Fix:Remove download notifications after download item finished #161
This commit is contained in:
@@ -325,6 +325,13 @@ class AbsDownloader : Plugin() {
|
|||||||
delay(500)
|
delay(500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove download notifications
|
||||||
|
downloadItem.downloadItemParts.forEach { downloadItemPart ->
|
||||||
|
downloadItemPart.downloadId?.let {
|
||||||
|
downloadManager.remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val downloadItemScanResult = folderScanner.scanDownloadItem(downloadItem)
|
val downloadItemScanResult = folderScanner.scanDownloadItem(downloadItem)
|
||||||
DeviceManager.dbManager.removeDownloadItem(downloadItem.id)
|
DeviceManager.dbManager.removeDownloadItem(downloadItem.id)
|
||||||
downloadQueue.remove(downloadItem)
|
downloadQueue.remove(downloadItem)
|
||||||
@@ -367,6 +374,7 @@ class AbsDownloader : Plugin() {
|
|||||||
if (!downloadItemPart.completed) {
|
if (!downloadItemPart.completed) {
|
||||||
Log.d(tag, "checkDownloads Download ${downloadItemPart.filename} Done")
|
Log.d(tag, "checkDownloads Download ${downloadItemPart.filename} Done")
|
||||||
downloadItemPart.completed = true
|
downloadItemPart.completed = true
|
||||||
|
|
||||||
val file = DocumentFileCompat.fromUri(mainActivity, downloadItemPart.destinationUri)
|
val file = DocumentFileCompat.fromUri(mainActivity, downloadItemPart.destinationUri)
|
||||||
Log.d(tag, "DOWNLOAD: Attempt move for file at destination ${downloadItemPart.destinationUri} | ${file?.getBasePath(mainActivity)}")
|
Log.d(tag, "DOWNLOAD: Attempt move for file at destination ${downloadItemPart.destinationUri} | ${file?.getBasePath(mainActivity)}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user