pull/43/head
kunfei 5 years ago
parent 350354ce86
commit 74f7136992
  1. 2
      app/src/main/java/io/legado/app/constant/RSSKeywords.kt
  2. 3
      app/src/main/java/io/legado/app/data/entities/RssArticle.kt
  3. 2
      app/src/main/java/io/legado/app/model/rss/RssParser.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"
}

@ -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,

@ -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) ->

Loading…
Cancel
Save