summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java3
-rw-r--r--model/src/main/java/de/danoeh/antennapod/model/feed/FeedMedia.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java
index 2a62e3e34..42f643cdc 100644
--- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java
+++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedItem.java
@@ -171,6 +171,9 @@ public class FeedItem implements Serializable {
public void setId(long id) {
this.id = id;
+ if (this.media != null) {
+ media.setItemId(id);
+ }
}
/**
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedMedia.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedMedia.java
index 1f0786875..1f5d87dd0 100644
--- a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedMedia.java
+++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedMedia.java
@@ -58,6 +58,7 @@ public class FeedMedia implements Playable {
this.downloadUrl = downloadUrl;
this.downloaded = false;
this.item = i;
+ this.itemID = i != null ? i.getId() : 0;
this.size = size;
this.mimeType = mimeType;
}
@@ -71,6 +72,7 @@ public class FeedMedia implements Playable {
this.downloaded = downloaded;
this.id = id;
this.item = item;
+ this.itemID = item != null ? item.getId() : 0;
this.duration = duration;
this.position = position;
this.playedDuration = playedDuration;
@@ -251,6 +253,7 @@ public class FeedMedia implements Playable {
*/
public void setItem(FeedItem item) {
this.item = item;
+ this.itemID = item != null ? item.getId() : 0;
if (item != null && item.getMedia() != this) {
item.setMedia(this);
}