diff options
author | ByteHamster <info@bytehamster.com> | 2019-01-19 10:56:07 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-01-19 10:56:10 +0100 |
commit | 6c2e9afad4db461ff0b52ca46a0e80ad988f0731 (patch) | |
tree | b80b559bf0427500e1bc6f033f992072a1d3f296 /app | |
parent | 24d72f93fa7a67394a1bb05acc2182056ef883df (diff) | |
download | AntennaPod-6c2e9afad4db461ff0b52ca46a0e80ad988f0731.zip |
Fixed displaying feed url
Closes #2989
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java index 5ab6bac63..9f8f59f7f 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -19,6 +19,7 @@ import java.util.List; import de.danoeh.antennapod.R; import de.danoeh.antennapod.adapter.DownloadLogAdapter; import de.danoeh.antennapod.core.feed.EventDistributor; +import de.danoeh.antennapod.core.feed.Feed; import de.danoeh.antennapod.core.feed.FeedMedia; import de.danoeh.antennapod.core.service.download.DownloadStatus; import de.danoeh.antennapod.core.storage.DBReader; @@ -93,10 +94,18 @@ public class DownloadLogFragment extends ListFragment { DownloadStatus status = adapter.getItem(position); String url = "unknown"; String message = getString(R.string.download_successful); - FeedMedia media = DBReader.getFeedMedia(status.getFeedfileId()); - if (media != null) { - url = media.getDownload_url(); + if (status.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) { + FeedMedia media = DBReader.getFeedMedia(status.getFeedfileId()); + if (media != null) { + url = media.getDownload_url(); + } + } else if (status.getFeedfileType() == Feed.FEEDFILETYPE_FEED) { + Feed feed = DBReader.getFeed(status.getFeedfileId()); + if (feed != null) { + url = feed.getDownload_url(); + } } + if (!status.isSuccessful()) { message = status.getReasonDetailed(); } |