mirror of
https://github.com/sudoxnym/audiobookshelf-atv.git
synced 2026-07-13 15:39:08 +00:00
Fix:Remove download notifications after download item finished #161
This commit is contained in:
parent
2f8ca51447
commit
718947522e
1 changed files with 8 additions and 0 deletions
|
|
@ -325,6 +325,13 @@ class AbsDownloader : Plugin() {
|
|||
delay(500)
|
||||
}
|
||||
|
||||
// Remove download notifications
|
||||
downloadItem.downloadItemParts.forEach { downloadItemPart ->
|
||||
downloadItemPart.downloadId?.let {
|
||||
downloadManager.remove(it)
|
||||
}
|
||||
}
|
||||
|
||||
val downloadItemScanResult = folderScanner.scanDownloadItem(downloadItem)
|
||||
DeviceManager.dbManager.removeDownloadItem(downloadItem.id)
|
||||
downloadQueue.remove(downloadItem)
|
||||
|
|
@ -367,6 +374,7 @@ class AbsDownloader : Plugin() {
|
|||
if (!downloadItemPart.completed) {
|
||||
Log.d(tag, "checkDownloads Download ${downloadItemPart.filename} Done")
|
||||
downloadItemPart.completed = true
|
||||
|
||||
val file = DocumentFileCompat.fromUri(mainActivity, downloadItemPart.destinationUri)
|
||||
Log.d(tag, "DOWNLOAD: Attempt move for file at destination ${downloadItemPart.destinationUri} | ${file?.getBasePath(mainActivity)}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue