From 7ed78887c4411762f1fff67d3ca2330deaec2cac Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 6 Apr 2023 20:01:39 +0200 Subject: [PATCH] Ignore 'new' action during sync (#6415) We never want to overwrite the local playback state. --- .../de/danoeh/antennapod/core/sync/EpisodeActionFilter.java | 2 -- .../main/java/de/danoeh/antennapod/core/sync/SyncService.java | 4 ---- 2 files changed, 6 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/sync/EpisodeActionFilter.java b/core/src/main/java/de/danoeh/antennapod/core/sync/EpisodeActionFilter.java index 184f24793..8250ab87e 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/sync/EpisodeActionFilter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/sync/EpisodeActionFilter.java @@ -25,8 +25,6 @@ public class EpisodeActionFilter { Pair key = new Pair<>(remoteAction.getPodcast(), remoteAction.getEpisode()); switch (remoteAction.getAction()) { case NEW: - remoteActionsThatOverrideLocalActions.put(key, remoteAction); - break; case DOWNLOAD: break; case PLAY: diff --git a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java index 2fd492cbd..7fe0c5e46 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java @@ -274,10 +274,6 @@ public class SyncService extends Worker { Log.i(TAG, "Feed item has no media: " + action); continue; } - if (action.getAction() == EpisodeAction.NEW) { - DBWriter.markItemPlayed(feedItem, FeedItem.UNPLAYED, true); - continue; - } feedItem.getMedia().setPosition(action.getPosition() * 1000); if (FeedItemUtil.hasAlmostEnded(feedItem.getMedia())) { Log.d(TAG, "Marking as played: " + action);