mirror of https://github.com/readrops/Readrops.git
Json feed format now works !
This commit is contained in:
parent
aeb4994c2a
commit
49e4b3e12f
|
@ -237,11 +237,13 @@ public class Feed implements Parcelable {
|
|||
|
||||
feed.setName(jsonFeed.getTitle());
|
||||
feed.setUrl(jsonFeed.getFeedUrl());
|
||||
feed.setSiteUrl(jsonFeed.getHomePageUrl());
|
||||
feed.setDescription(jsonFeed.getDescription());
|
||||
//feed.setLastUpdated(jsonFeed.); maybe later ?
|
||||
|
||||
feed.setEtag(jsonFeed.getEtag());
|
||||
feed.setLastModified(jsonFeed.getLastModified());
|
||||
feed.setIconUrl(jsonFeed.getFaviconUrl());
|
||||
|
||||
feed.setFolderId(1);
|
||||
|
||||
|
|
|
@ -275,7 +275,9 @@ public class Item implements Comparable<Item> {
|
|||
for (JSONItem item : items) {
|
||||
Item dbItem = new Item();
|
||||
|
||||
dbItem.setAuthor(item.getAuthor().getName());
|
||||
if (item.getAuthor() != null)
|
||||
dbItem.setAuthor(item.getAuthor().getName());
|
||||
|
||||
dbItem.setContent(item.getContent());
|
||||
dbItem.setDescription(item.getSummary());
|
||||
dbItem.setGuid(item.getId());
|
||||
|
|
|
@ -66,7 +66,13 @@ public abstract class ARepository {
|
|||
}
|
||||
|
||||
protected void setFavIconUtils(Feed feed) throws IOException {
|
||||
String favUrl = HtmlParser.getFaviconLink(feed.getSiteUrl());
|
||||
String favUrl;
|
||||
|
||||
if (feed.getIconUrl() != null)
|
||||
favUrl = feed.getIconUrl();
|
||||
else
|
||||
favUrl = HtmlParser.getFaviconLink(feed.getSiteUrl());
|
||||
|
||||
if (favUrl != null && Patterns.WEB_URL.matcher(favUrl).matches()) {
|
||||
feed.setIconUrl(favUrl);
|
||||
setFeedColors(favUrl, feed);
|
||||
|
|
Loading…
Reference in New Issue