diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-01-23 09:51:49 -0500 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2016-01-23 09:51:49 -0500 |
commit | c0884f72d8663e136d327eb8b06f7df1f5178aed (patch) | |
tree | 393db39ce864664e62e9c59858e54ca8c0314837 /core/src | |
parent | 1a0b4ce6bfd4557d1b8444ab2361014b3a2a84cf (diff) | |
parent | 71d67864d2119537add59a3ebd0ef365f5c78856 (diff) | |
download | AntennaPod-c0884f72d8663e136d327eb8b06f7df1f5178aed.zip |
Merge pull request #1586 from mfietz/issue/1529-delayed-availability
Reset episode to new if media becomes available
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java | 6 |
1 files changed, 6 insertions, 0 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 a7d553120..ae22d5460 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 @@ -8,6 +8,7 @@ import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.Nullable; +import android.text.TextUtils; import java.util.Date; import java.util.List; @@ -167,6 +168,11 @@ public class FeedMedia extends FeedFile implements Playable { } public void updateFromOther(FeedMedia other) { + // we try to cover two cases: (1) feed did include file before (2) feed contained wrong URL + // if item.getAutoDownload() is false, the file has been downloaded before + if((TextUtils.isEmpty(download_url) || item.getAutoDownload()) && !TextUtils.isEmpty(other.download_url)) { + item.setNew(); + } super.updateFromOther(other); if (other.size > 0) { size = other.size; |