diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-02-17 22:32:02 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-02-17 22:32:02 +0100 |
commit | 9d30e697e61c1af61cbcc2789c87dc05c1265c8b (patch) | |
tree | ce1babcd100cc092da01b0493ddfa8c0b42f65c3 | |
parent | 2afcb580bf88c0b88fb05d7fefb35b739b1978c5 (diff) | |
download | AntennaPod-9d30e697e61c1af61cbcc2789c87dc05c1265c8b.zip |
Resolved issue with guids in rss 2 feeds. fixes #351 and #336
-rw-r--r-- | src/de/danoeh/antennapod/feed/FeedItem.java | 4 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/de/danoeh/antennapod/feed/FeedItem.java b/src/de/danoeh/antennapod/feed/FeedItem.java index eaae6ae5e..f63b5beb4 100644 --- a/src/de/danoeh/antennapod/feed/FeedItem.java +++ b/src/de/danoeh/antennapod/feed/FeedItem.java @@ -107,9 +107,9 @@ public class FeedItem extends FeedComponent implements * of the entry. */ public String getIdentifyingValue() { - if (itemIdentifier != null) { + if (itemIdentifier != null && !itemIdentifier.isEmpty()) { return itemIdentifier; - } else if (title != null) { + } else if (title != null && !title.isEmpty()) { return title; } else { return link; diff --git a/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java b/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java index 5a2c6005e..3eb49172d 100644 --- a/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java +++ b/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java @@ -101,7 +101,10 @@ public class NSRSS20 extends Namespace { } if (top.equals(GUID) && second.equals(ITEM)) { - state.getCurrentItem().setItemIdentifier(content); + // some feed creators include an empty or non-standard guid-element in their feed, which should be ignored + if (!content.isEmpty()) { + state.getCurrentItem().setItemIdentifier(content); + } } else if (top.equals(TITLE)) { if (second.equals(ITEM)) { state.getCurrentItem().setTitle(content); |