From 8037bd2239496495a03a06dda1307627ffc3c18b Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Mon, 15 Apr 2024 19:22:07 +0200 Subject: [PATCH] Fix default per-feed skip silence setting (#7101) --- .../java/de/danoeh/antennapod/model/feed/FeedPreferences.java | 3 +++ .../de/danoeh/antennapod/storage/database/DBUpgrader.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java index 04c3849a2..a5fe60fb2 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedPreferences.java @@ -249,6 +249,9 @@ public class FeedPreferences implements Serializable { } public SkipSilence getFeedSkipSilence() { + if (feedPlaybackSpeed == SPEED_USE_GLOBAL) { + return SkipSilence.GLOBAL; + } return feedSkipSilence; } diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBUpgrader.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBUpgrader.java index b7aec5b39..5285010c3 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBUpgrader.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBUpgrader.java @@ -7,6 +7,7 @@ import android.media.MediaMetadataRetriever; import android.util.Log; import de.danoeh.antennapod.model.feed.FeedItem; +import de.danoeh.antennapod.model.feed.FeedPreferences; import static de.danoeh.antennapod.model.feed.FeedPreferences.SPEED_USE_GLOBAL; @@ -336,7 +337,8 @@ class DBUpgrader { } if (oldVersion < 3040000) { db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS - + " ADD COLUMN " + PodDBAdapter.KEY_FEED_SKIP_SILENCE + " INTEGER"); + + " ADD COLUMN " + PodDBAdapter.KEY_FEED_SKIP_SILENCE + + " INTEGER DEFAULT " + FeedPreferences.SkipSilence.GLOBAL.code); } }