summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/syndication/namespace
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-08-05 14:57:37 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2013-08-05 14:57:37 +0200
commit75b13431fed4dbc4e259ead8a3762143be740432 (patch)
tree0107281d2021c326d3acb557b0ad1c1d36019d2e /src/de/danoeh/antennapod/syndication/namespace
parent3f5e2faff941f220c7a882bfba4f86e85219d7ba (diff)
parent95148ace8e44df4fa3b8cc6b6afc83bed6be4d04 (diff)
downloadAntennaPod-75b13431fed4dbc4e259ead8a3762143be740432.zip
Merge branch 'develop' into feedmanager_removal
Conflicts: src/de/danoeh/antennapod/activity/PreferenceActivity.java src/de/danoeh/antennapod/feed/FeedManager.java src/de/danoeh/antennapod/service/PlaybackService.java src/de/danoeh/antennapod/service/download/DownloadService.java src/de/danoeh/antennapod/service/download/DownloadStatus.java src/de/danoeh/antennapod/service/download/HttpDownloader.java src/de/danoeh/antennapod/storage/DownloadRequester.java src/de/danoeh/antennapod/storage/PodDBAdapter.java src/de/danoeh/antennapod/util/playback/PlaybackController.java
Diffstat (limited to 'src/de/danoeh/antennapod/syndication/namespace')
-rw-r--r--src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java b/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java
index 4d0b42132..5a2c6005e 100644
--- a/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java
+++ b/src/de/danoeh/antennapod/syndication/namespace/NSRSS20.java
@@ -78,6 +78,15 @@ public class NSRSS20 extends Namespace {
@Override
public void handleElementEnd(String localName, HandlerState state) {
if (localName.equals(ITEM)) {
+ if (state.getCurrentItem() != null) {
+ // the title tag is optional in RSS 2.0. The description is used
+ // as a
+ // title if the item has no title-tag.
+ if (state.getCurrentItem().getTitle() == null) {
+ state.getCurrentItem().setTitle(
+ state.getCurrentItem().getDescription());
+ }
+ }
state.setCurrentItem(null);
} else if (state.getTagstack().size() >= 2
&& state.getContentBuf() != null) {
@@ -98,7 +107,8 @@ public class NSRSS20 extends Namespace {
state.getCurrentItem().setTitle(content);
} else if (second.equals(CHANNEL)) {
state.getFeed().setTitle(content);
- } else if (second.equals(IMAGE) && third != null && third.equals(CHANNEL)) {
+ } else if (second.equals(IMAGE) && third != null
+ && third.equals(CHANNEL)) {
state.getFeed().getImage().setTitle(content);
}
} else if (top.equals(LINK)) {
@@ -110,7 +120,8 @@ public class NSRSS20 extends Namespace {
} else if (top.equals(PUBDATE) && second.equals(ITEM)) {
state.getCurrentItem().setPubDate(
SyndDateUtils.parseRFC822Date(content));
- } else if (top.equals(URL) && second.equals(IMAGE) && third != null && third.equals(CHANNEL)) {
+ } else if (top.equals(URL) && second.equals(IMAGE) && third != null
+ && third.equals(CHANNEL)) {
state.getFeed().getImage().setDownload_url(content);
} else if (localName.equals(DESCR)) {
if (second.equals(CHANNEL)) {