From 3289a4fb9694c26106b30dae9b30128cd19cfa42 Mon Sep 17 00:00:00 2001
From: deniscerri <64997243+deniscerri@users.noreply.github.com>
Date: Sun, 28 May 2023 22:32:35 +0200
Subject: [PATCH] more stuff
tapping running download notification, will open download queue screen now
fixed app closing running application when trying to share a file from the notification
trending videos and search results will use piped now
---
app/src/main/AndroidManifest.xml | 16 +---
.../com/deniscerri/ytdlnis/MainActivity.kt | 15 ++++
.../ytdlnis/receiver/ShareActivity.kt | 11 +--
.../ytdlnis/receiver/ShareFileService.kt | 26 ++++++
.../receiver/SharedNotificationReceiver.kt | 25 ------
.../ConfigureDownloadBottomSheetDialog.kt | 6 +-
.../downloadcard/CutVideoBottomSheetDialog.kt | 4 -
.../ui/downloadcard/DownloadAudioFragment.kt | 8 +-
.../downloadcard/DownloadBottomSheetDialog.kt | 8 +-
.../downloadcard/DownloadCommandFragment.kt | 6 +-
.../DownloadMultipleBottomSheetDialog.kt | 6 +-
.../ui/downloadcard/DownloadVideoFragment.kt | 11 +--
.../FormatSelectionBottomSheetDialog.kt | 6 +-
.../downloads/CancelledDownloadsFragment.kt | 6 +-
.../ui/downloads/ErroredDownloadsFragment.kt | 6 +-
.../ytdlnis/ui/downloads/HistoryFragment.kt | 12 ++-
.../ui/downloads/QueuedDownloadsFragment.kt | 8 +-
.../ui/more/CommandTemplatesFragment.kt | 8 +-
.../ytdlnis/ui/more/CookiesFragment.kt | 2 -
.../ytdlnis/ui/more/TerminalActivity.kt | 4 +-
.../more/settings/FolderSettingsFragment.kt | 49 +++++++++++
.../settings/ProcessingSettingsFragment.kt | 5 --
.../com/deniscerri/ytdlnis/util/FileUtil.kt | 8 +-
.../com/deniscerri/ytdlnis/util/InfoUtil.kt | 39 ++++----
.../ytdlnis/util/NotificationUtil.kt | 72 ++++++++++++---
.../com/deniscerri/ytdlnis/util/UiUtil.kt | 6 +-
.../deniscerri/ytdlnis/work/DownloadWorker.kt | 15 ++--
.../ytdlnis/work/MoveCacheFilesWorker.kt | 88 +++++++++++++++++++
.../ytdlnis/work/TerminalDownloadWorker.kt | 3 +-
.../drawable/baseline_drive_file_move_24.xml | 5 ++
app/src/main/res/values/strings.xml | 2 +
app/src/main/res/xml/folders_preference.xml | 29 ++++++
.../main/res/xml/processing_preferences.xml | 21 -----
33 files changed, 351 insertions(+), 185 deletions(-)
create mode 100644 app/src/main/java/com/deniscerri/ytdlnis/receiver/ShareFileService.kt
delete mode 100644 app/src/main/java/com/deniscerri/ytdlnis/receiver/SharedNotificationReceiver.kt
create mode 100644 app/src/main/java/com/deniscerri/ytdlnis/work/MoveCacheFilesWorker.kt
create mode 100644 app/src/main/res/drawable/baseline_drive_file_move_24.xml
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 66274e06..ca37a6eb 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -128,18 +128,6 @@
-
-
-
-
-
-
-
+
+
private lateinit var onDownloadItemUpdateListener: OnDownloadItemUpdateListener
- private lateinit var uiUtil: UiUtil
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -50,7 +49,6 @@ class ConfigureDownloadBottomSheetDialog(private val resultItem: ResultItem, pri
resultViewModel = ViewModelProvider(this)[ResultViewModel::class.java]
commandTemplateDao = DBManager.getInstance(requireContext()).commandTemplateDao
onDownloadItemUpdateListener = listener
- uiUtil = UiUtil()
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -188,10 +186,10 @@ class ConfigureDownloadBottomSheetDialog(private val resultItem: ResultItem, pri
val link = view.findViewById