From 155d769fca0046f32693d0a8191f44438fc30e0f Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 24 May 2024 10:00:28 +0200 Subject: Fix marking as played when there is no media (#7192) --- .../main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/database') diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java index 19660fb77..15debd029 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java @@ -693,7 +693,7 @@ public class PodDBAdapter { db.update(TABLE_NAME_FEED_ITEMS, values, KEY_ID + "=?", new String[]{String.valueOf(item.getId())}); item.setPlayed(played == FeedItem.PLAYED); - if (resetMediaPosition) { + if (resetMediaPosition && item.hasMedia()) { values.clear(); values.put(KEY_POSITION, 0); db.update(TABLE_NAME_FEED_MEDIA, values, KEY_ID + "=?", -- cgit v1.2.3