From 234ca8c08f766b4628dbe43c44446956dbfed11f Mon Sep 17 00:00:00 2001 From: shantanu1k Date: Sat, 22 Oct 2022 14:59:33 +0530 Subject: [PATCH] Simplified the download notification --- .../com/github/libretube/services/DownloadService.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/github/libretube/services/DownloadService.kt b/app/src/main/java/com/github/libretube/services/DownloadService.kt index dc5893993..706dcff04 100644 --- a/app/src/main/java/com/github/libretube/services/DownloadService.kt +++ b/app/src/main/java/com/github/libretube/services/DownloadService.kt @@ -48,7 +48,7 @@ class DownloadService : Service() { } if (downloadType != DownloadType.NONE) { - downloadManager() + downloadManager(videoName) } else { onDestroy() } @@ -60,7 +60,7 @@ class DownloadService : Service() { TODO("Not yet implemented") } - private fun downloadManager() { + private fun downloadManager(videoName: String) { // initialize and create the directories to download into val videoDownloadDir = DownloadHelper.getVideoDir(this) @@ -74,7 +74,7 @@ class DownloadService : Service() { ) if (downloadType in listOf(DownloadType.VIDEO, DownloadType.AUDIO_VIDEO)) { videoDownloadId = downloadManagerRequest( - getString(R.string.video), + videoName, getString(R.string.downloading), videoUrl, Uri.fromFile( @@ -82,9 +82,9 @@ class DownloadService : Service() { ) ) } - if (downloadType in listOf(DownloadType.AUDIO, DownloadType.AUDIO_VIDEO)) { + else if (downloadType in listOf(DownloadType.AUDIO, DownloadType.AUDIO_VIDEO)) { audioDownloadId = downloadManagerRequest( - getString(R.string.audio), + videoName, getString(R.string.downloading), audioUrl, Uri.fromFile(