From fa75317bce95bdae152fa1171894d4c025e3921c Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 22 Oct 2023 16:51:16 +0200 Subject: [PATCH] Do not try to sync local feeds (#6722) --- .../de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java | 4 ++-- .../antennapod/core/sync/queue/SynchronizationQueueSink.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java index 4de53ce1e..de4cec8fe 100644 --- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java @@ -154,7 +154,7 @@ public class FeedItemMenuHandler { } else if (menuItemId == R.id.mark_read_item) { selectedItem.setPlayed(true); DBWriter.markItemPlayed(selectedItem, FeedItem.PLAYED, true); - if (SynchronizationSettings.isProviderConnected()) { + if (!selectedItem.getFeed().isLocalFeed() && SynchronizationSettings.isProviderConnected()) { FeedMedia media = selectedItem.getMedia(); // not all items have media, Gpodder only cares about those that do if (media != null) { @@ -170,7 +170,7 @@ public class FeedItemMenuHandler { } else if (menuItemId == R.id.mark_unread_item) { selectedItem.setPlayed(false); DBWriter.markItemPlayed(selectedItem, FeedItem.UNPLAYED, false); - if (selectedItem.getMedia() != null) { + if (!selectedItem.getFeed().isLocalFeed() && selectedItem.getMedia() != null) { EpisodeAction actionNew = new EpisodeAction.Builder(selectedItem, EpisodeAction.NEW) .currentTimestamp() .build(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/sync/queue/SynchronizationQueueSink.java b/core/src/main/java/de/danoeh/antennapod/core/sync/queue/SynchronizationQueueSink.java index 12559539f..cfe3798a7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/sync/queue/SynchronizationQueueSink.java +++ b/core/src/main/java/de/danoeh/antennapod/core/sync/queue/SynchronizationQueueSink.java @@ -64,7 +64,7 @@ public class SynchronizationQueueSink { if (!SynchronizationSettings.isProviderConnected()) { return; } - if (media.getItem() == null) { + if (media.getItem() == null || media.getItem().getFeed().isLocalFeed()) { return; } if (media.getStartPosition() < 0 || (!completed && media.getStartPosition() >= media.getPosition())) {