From 9cae7c5bfbe252158ddfa6195519db2dbb0a950e Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Sun, 5 Jul 2015 15:28:30 +0200 Subject: [PATCH] Small fixes. --- .../src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java | 2 +- .../java/de/danoeh/antennapod/core/storage/PodDBAdapter.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java index 302e4e2dd..33dd9d636 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java @@ -186,7 +186,7 @@ public class FeedMedia extends FeedFile implements Playable { public void setPosition(int position) { this.position = position; - if(position > 0) { + if(position > 0 && item.isNew()) { this.item.setPlayed(false); } } diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index 8f09ff3c2..2be53047d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -877,12 +877,10 @@ public class PodDBAdapter { public void setQueue(List queue) { ContentValues values = new ContentValues(); - long[] ids = new long[queue.size()]; db.beginTransaction(); db.delete(TABLE_NAME_QUEUE, null, null); for (int i = 0; i < queue.size(); i++) { FeedItem item = queue.get(i); - ids[i] = item.getId(); values.put(KEY_ID, i); values.put(KEY_FEEDITEM, item.getId()); values.put(KEY_FEED, item.getFeed().getId());