diff options
author | ByteHamster <info@bytehamster.com> | 2019-09-30 20:39:02 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-09-30 20:39:02 +0200 |
commit | f71b933c6baaec4d7b4255737d5be186953806a2 (patch) | |
tree | 1ed7097628e2d7620d3ec935216bb67cb2a4990b | |
parent | ea84dde76fd5eb71d611bcc775a7db3b0e333e0e (diff) | |
download | AntennaPod-f71b933c6baaec4d7b4255737d5be186953806a2.zip |
Fixed feed without any identifying value
3 files changed, 7 insertions, 3 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 3495164a6..744e9b924 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 @@ -218,6 +218,8 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, ImageR return itemIdentifier; } else if (title != null && !title.isEmpty()) { return title; + } else if (hasMedia() && media.getDownload_url() != null) { + return media.getDownload_url(); } else { return link; } diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java index ce61bff68..5e81d279f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java @@ -668,6 +668,7 @@ public class DownloadService extends Service { Log.e(TAG, "FeedSyncThread was interrupted"); } catch (ExecutionException e) { Log.e(TAG, "ExecutionException in FeedSyncThread: " + e.getMessage()); + e.printStackTrace(); } } @@ -702,6 +703,7 @@ public class DownloadService extends Service { Log.e(TAG, "FeedSyncThread was interrupted"); } catch (ExecutionException e) { Log.e(TAG, "ExecutionException in FeedSyncThread: " + e.getMessage()); + e.printStackTrace(); } } diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index 4c15f5f00..46fa4b99c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -4,6 +4,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.os.Looper; +import android.text.TextUtils; import android.util.Log; import java.util.ArrayList; @@ -440,10 +441,9 @@ public final class DBTasks { /** * Get a FeedItem by its identifying value. */ - private static FeedItem searchFeedItemByIdentifyingValue(Feed feed, - String identifier) { + private static FeedItem searchFeedItemByIdentifyingValue(Feed feed, String identifier) { for (FeedItem item : feed.getItems()) { - if (item.getIdentifyingValue().equals(identifier)) { + if (TextUtils.equals(item.getIdentifyingValue(), identifier)) { return item; } } |