Skip to content

Commit

Permalink
Fix deleting downloaded episode removes from queue (#7151)
Browse files Browse the repository at this point in the history
  • Loading branch information
flofriday committed May 1, 2024
1 parent b877344 commit 3ed5b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -171,6 +171,9 @@ public long getId() {

public void setId(long id) {
this.id = id;
if (this.media != null) {
media.setItemId(id);
}
}

/**
Expand Down
Expand Up @@ -58,6 +58,7 @@ public FeedMedia(FeedItem i, String downloadUrl, long size,
this.downloadUrl = downloadUrl;
this.downloaded = false;
this.item = i;
this.itemID = i != null ? i.getId() : 0;
this.size = size;
this.mimeType = mimeType;
}
Expand All @@ -71,6 +72,7 @@ public FeedMedia(long id, FeedItem item, int duration, int position,
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;
Expand Down Expand Up @@ -251,6 +253,7 @@ public FeedItem getItem() {
*/
public void setItem(FeedItem item) {
this.item = item;
this.itemID = item != null ? item.getId() : 0;
if (item != null && item.getMedia() != this) {
item.setMedia(this);
}
Expand Down

0 comments on commit 3ed5b8a

Please sign in to comment.