From 74f7136992ef87c384bd0c81843c82aa169ba8e0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 26 Oct 2019 15:28:52 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/constant/RSSKeywords.kt | 2 -- app/src/main/java/io/legado/app/data/entities/RssArticle.kt | 3 +-- app/src/main/java/io/legado/app/model/rss/RssParser.kt | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/RSSKeywords.kt b/app/src/main/java/io/legado/app/constant/RSSKeywords.kt index bb8d4207a..686842950 100644 --- a/app/src/main/java/io/legado/app/constant/RSSKeywords.kt +++ b/app/src/main/java/io/legado/app/constant/RSSKeywords.kt @@ -5,7 +5,6 @@ object RSSKeywords { const val RSS_ITEM = "item" const val RSS_ITEM_TITLE = "title" const val RSS_ITEM_LINK = "link" - const val RSS_ITEM_AUTHOR = "author" const val RSS_ITEM_CATEGORY = "category" const val RSS_ITEM_THUMBNAIL = "media:thumbnail" const val RSS_ITEM_ENCLOSURE = "enclosure" @@ -15,5 +14,4 @@ object RSSKeywords { const val RSS_ITEM_TIME = "time" const val RSS_ITEM_URL = "url" const val RSS_ITEM_TYPE = "type" - const val RSS_ITEM_GUID = "guid" } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/data/entities/RssArticle.kt b/app/src/main/java/io/legado/app/data/entities/RssArticle.kt index b44949155..9e7f9f7a8 100644 --- a/app/src/main/java/io/legado/app/data/entities/RssArticle.kt +++ b/app/src/main/java/io/legado/app/data/entities/RssArticle.kt @@ -12,8 +12,7 @@ data class RssArticle( var origin: String = "", var title: String = "", var order: Long = 0, - var author: String? = null, - var link: String? = null, + var link: String = "", var pubDate: String? = null, var description: String? = null, var content: String? = null, diff --git a/app/src/main/java/io/legado/app/model/rss/RssParser.kt b/app/src/main/java/io/legado/app/model/rss/RssParser.kt index b8d56b939..6a3508aab 100644 --- a/app/src/main/java/io/legado/app/model/rss/RssParser.kt +++ b/app/src/main/java/io/legado/app/model/rss/RssParser.kt @@ -39,8 +39,6 @@ object RssParser { if (insideItem) currentArticle.title = xmlPullParser.nextText().trim() xmlPullParser.name.equals(RSSKeywords.RSS_ITEM_LINK, true) -> if (insideItem) currentArticle.link = xmlPullParser.nextText().trim() - xmlPullParser.name.equals(RSSKeywords.RSS_ITEM_AUTHOR, true) -> - if (insideItem) currentArticle.author = xmlPullParser.nextText().trim() xmlPullParser.name.equals(RSSKeywords.RSS_ITEM_CATEGORY, true) -> if (insideItem) currentArticle.categoryList.add(xmlPullParser.nextText().trim()) xmlPullParser.name.equals(RSSKeywords.RSS_ITEM_THUMBNAIL, true) ->