From 02caa29fafe1a86dcd1a42ef3ecca5fd1a3bbfe0 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 24 Nov 2019 09:47:40 +0100 Subject: [PATCH] Hotfix: Do not delete episodes --- .../danoeh/antennapod/core/preferences/UserPreferences.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index a928f3529..4f871e83b 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -833,6 +833,9 @@ public class UserPreferences { } public static EpisodeCleanupAlgorithm getEpisodeCleanupAlgorithm() { + if (!isEnableAutodownload()) { + return new APNullCleanupAlgorithm(); + } int cleanupValue = getEpisodeCleanupValue(); if (cleanupValue == EPISODE_CLEANUP_QUEUE) { return new APQueueCleanupAlgorithm(); @@ -844,7 +847,7 @@ public class UserPreferences { } public static int getEpisodeCleanupValue() { - return Integer.parseInt(prefs.getString(PREF_EPISODE_CLEANUP, "-1")); + return Integer.parseInt(prefs.getString(PREF_EPISODE_CLEANUP, "" + EPISODE_CLEANUP_NULL)); } public static void setEpisodeCleanupValue(int episodeCleanupValue) {