Fix default per-feed skip silence setting (#7101)

This commit is contained in:
ByteHamster 2024-04-15 19:22:07 +02:00 committed by GitHub
parent 25e4703da4
commit 8037bd2239
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -249,6 +249,9 @@ public class FeedPreferences implements Serializable {
} }
public SkipSilence getFeedSkipSilence() { public SkipSilence getFeedSkipSilence() {
if (feedPlaybackSpeed == SPEED_USE_GLOBAL) {
return SkipSilence.GLOBAL;
}
return feedSkipSilence; return feedSkipSilence;
} }

View File

@ -7,6 +7,7 @@ import android.media.MediaMetadataRetriever;
import android.util.Log; import android.util.Log;
import de.danoeh.antennapod.model.feed.FeedItem; 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; import static de.danoeh.antennapod.model.feed.FeedPreferences.SPEED_USE_GLOBAL;
@ -336,7 +337,8 @@ class DBUpgrader {
} }
if (oldVersion < 3040000) { if (oldVersion < 3040000) {
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS 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);
} }
} }