diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-24 11:52:51 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-24 11:52:51 +0100 |
commit | 4cc31d4be97b35608771ddf7eabee98c9dc3252c (patch) | |
tree | 4f2226f967fad46740ce7f178f0eaf8ff5c95e9b /core/src/main | |
parent | 8a0f6cb5296ed2e2bf4d360b1c8e1dabb193bb88 (diff) | |
download | AntennaPod-4cc31d4be97b35608771ddf7eabee98c9dc3252c.zip |
Reset episode to new if episode file is added later
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java index b2192c66f..4921c0576 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java @@ -195,6 +195,8 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, Flattr if (other.media != null) { if (media == null) { setMedia(other.media); + // reset to new if feed item did link to a file before + setNew(); } else if (media.compareWithOther(other.media)) { media.updateFromOther(other.media); } 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 8a04e65ec..991499316 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,7 +8,6 @@ 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; @@ -168,10 +167,6 @@ public class FeedMedia extends FeedFile implements Playable { } public void updateFromOther(FeedMedia other) { - // reset to new if feed item did link to a file before - if(TextUtils.isEmpty(download_url) && !TextUtils.isEmpty(other.download_url)) { - item.setNew(); - } super.updateFromOther(other); if (other.size > 0) { size = other.size; |