From e25fcc682b61c3da957cc5b59ee8fd2dad62e6e3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 20 Jul 2024 10:34:07 -0600 Subject: [PATCH] Exclude download keys from backups --- .../java/com/lagradost/cloudstream3/utils/BackupUtils.kt | 7 +++++++ .../lagradost/cloudstream3/utils/VideoDownloadManager.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt index 1d23e503..82a6d5bf 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt @@ -35,6 +35,9 @@ import com.lagradost.cloudstream3.utils.DataStore.getSharedPrefs import com.lagradost.cloudstream3.utils.DataStore.mapper import com.lagradost.cloudstream3.utils.UIHelper.checkWrite import com.lagradost.cloudstream3.utils.UIHelper.requestRW +import com.lagradost.cloudstream3.utils.VideoDownloadManager.KEY_DOWNLOAD_INFO +import com.lagradost.cloudstream3.utils.VideoDownloadManager.KEY_RESUME_PACKAGES +import com.lagradost.cloudstream3.utils.VideoDownloadManager.KEY_RESUME_QUEUE_PACKAGES import com.lagradost.cloudstream3.utils.VideoDownloadManager.setupStream import okhttp3.internal.closeQuietly import java.io.OutputStream @@ -68,6 +71,10 @@ object BackupUtils { SUBDL_SUBTITLES_USER_KEY, DOWNLOAD_EPISODE_CACHE, + DOWNLOAD_HEADER_CACHE, + KEY_DOWNLOAD_INFO, + KEY_RESUME_PACKAGES, + KEY_RESUME_QUEUE_PACKAGES, "biometric_key", // can lock down users if backup is shared on a incompatible device "nginx_user", // Nginx user key diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt index 197bacc6..ce37ef15 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt @@ -180,7 +180,7 @@ object VideoDownloadManager { const val KEY_RESUME_PACKAGES = "download_resume" const val KEY_DOWNLOAD_INFO = "download_info" - private const val KEY_RESUME_QUEUE_PACKAGES = "download_q_resume" + const val KEY_RESUME_QUEUE_PACKAGES = "download_q_resume" val downloadStatus = HashMap() val downloadStatusEvent = Event>()