Skip to content

Commit

Permalink
Add support for reading URL tag from RSS item
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Mar 2, 2024
1 parent 24208e0 commit d881559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class FeedParser(private val dispatchersProvider: DispatchersProvider) {

internal const val TAG_TITLE = "title"
internal const val TAG_LINK = "link"
internal const val TAG_URL = "url"
internal const val TAG_DESCRIPTION = "description"
internal const val TAG_ENCLOSURE = "enclosure"
internal const val TAG_CONTENT_ENCODED = "content:encoded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_PUB
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_RSS_CHANNEL
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_RSS_ITEM
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_TITLE
import dev.sasikanth.rss.reader.core.network.parser.FeedParser.Companion.TAG_URL
import dev.sasikanth.rss.reader.util.dateStringToEpochMillis
import io.ktor.http.Url
import kotlinx.datetime.Clock
Expand Down Expand Up @@ -114,7 +115,7 @@ internal object RssContentParser : ContentParser() {
name == TAG_TITLE -> {
title = readTagText(name, parser)
}
name == TAG_LINK -> {
link.isNullOrBlank() && (name == TAG_LINK || name == TAG_URL) -> {
link = readTagText(name, parser)
}
name == TAG_ENCLOSURE && link.isNullOrBlank() -> {
Expand Down

0 comments on commit d881559

Please sign in to comment.