summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/feed/FeedMedia.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/danoeh/antennapod/feed/FeedMedia.java')
-rw-r--r--src/de/danoeh/antennapod/feed/FeedMedia.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/de/danoeh/antennapod/feed/FeedMedia.java b/src/de/danoeh/antennapod/feed/FeedMedia.java
index de87c63a1..fd3d2ebb0 100644
--- a/src/de/danoeh/antennapod/feed/FeedMedia.java
+++ b/src/de/danoeh/antennapod/feed/FeedMedia.java
@@ -8,6 +8,7 @@ import android.content.SharedPreferences.Editor;
import android.os.Parcel;
import android.os.Parcelable;
import de.danoeh.antennapod.PodcastApp;
+import de.danoeh.antennapod.preferences.PlaybackPreferences;
import de.danoeh.antennapod.util.ChapterUtils;
import de.danoeh.antennapod.util.playback.Playable;
@@ -103,6 +104,15 @@ public class FeedMedia extends FeedFile implements Playable {
return false;
}
+ /**
+ * Reads playback preferences to determine whether this FeedMedia object is
+ * currently being played.
+ */
+ public boolean isPlaying() {
+ return PlaybackPreferences.getCurrentlyPlayingMedia() == FeedMedia.PLAYABLE_TYPE_FEEDMEDIA
+ && PlaybackPreferences.getCurrentlyPlayingFeedMediaId() == id;
+ }
+
@Override
public int getTypeAsInt() {
return FEEDFILETYPE_FEEDMEDIA;
@@ -257,10 +267,6 @@ public class FeedMedia extends FeedFile implements Playable {
@Override
public void onPlaybackStart() {
- if (getItem().isRead() == false) {
- FeedManager.getInstance().markItemRead(PodcastApp.getInstance(),
- getItem(), true, false);
- }
}
@Override