Skip to content

Commit

Permalink
Skip items in feeds if they don't have link or title & description
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Feb 22, 2025
1 parent 2309cb3 commit 2c8b715
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal object AtomContentParser : ContentParser() {

val postPubDateInMillis = date?.dateStringToEpochMillis()

if (title.isNullOrBlank() && content.isNullOrBlank()) {
if (link.isNullOrBlank() || (title.isNullOrBlank() && content.isNullOrBlank())) {
return null
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ internal object RDFContentParser : ContentParser() {

val postPubDateInMillis = date?.dateStringToEpochMillis()

if (title.isNullOrBlank() && description.isNullOrBlank()) {
if (link.isNullOrBlank() || (title.isNullOrBlank() && description.isNullOrBlank())) {
return null
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ internal object RSSContentParser : ContentParser() {

val postPubDateInMillis = date?.dateStringToEpochMillis()

if (title.isNullOrBlank() && description.isNullOrBlank()) {
if (link.isNullOrBlank() || (title.isNullOrBlank() && description.isNullOrBlank())) {
return null
}

Expand Down

0 comments on commit 2c8b715

Please sign in to comment.