diff --git a/src/de/danoeh/antennapod/feed/Feed.java b/src/de/danoeh/antennapod/feed/Feed.java index 5fea2d142..9c4e7e75c 100644 --- a/src/de/danoeh/antennapod/feed/Feed.java +++ b/src/de/danoeh/antennapod/feed/Feed.java @@ -10,8 +10,8 @@ import java.util.Date; * */ public class Feed extends FeedFile { - private static final String TYPE_RSS2 = "rss"; - private static final String TYPE_ATOM1 = "atom"; + public static final String TYPE_RSS2 = "rss"; + public static final String TYPE_ATOM1 = "atom"; private String title; /** Link to the website. */ diff --git a/src/de/danoeh/antennapod/feed/FeedManager.java b/src/de/danoeh/antennapod/feed/FeedManager.java index fb4c949d5..f979aa1f3 100644 --- a/src/de/danoeh/antennapod/feed/FeedManager.java +++ b/src/de/danoeh/antennapod/feed/FeedManager.java @@ -361,7 +361,9 @@ public class FeedManager { markItemRead(context, item, false); } } + // update attributes savedFeed.setLastUpdate(newFeed.getLastUpdate()); + savedFeed.setType(newFeed.getType()); setFeed(context, savedFeed); return savedFeed; } diff --git a/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java b/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java index a96eb4a8e..f8066db40 100644 --- a/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java +++ b/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java @@ -40,12 +40,14 @@ public class TypeGetter { if (eventType == XmlPullParser.START_TAG) { String tag = xpp.getName(); if (tag.equals(ATOM_ROOT)) { + feed.setType(Feed.TYPE_ATOM1); if (AppConfig.DEBUG) Log.d(TAG, "Recognized type Atom"); return Type.ATOM; } else if (tag.equals(RSS_ROOT) && (xpp.getAttributeValue(null, "version") .equals("2.0"))) { + feed.setType(Feed.TYPE_RSS2); if (AppConfig.DEBUG) Log.d(TAG, "Recognized type RSS 2.0"); return Type.RSS20;