summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-07-29 12:04:17 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-07-29 12:04:17 +0200
commit54d062900808b5646bd8e9b0ec856c0a42da90dd (patch)
treed7e9cf7e96b5d1d6823fab8293bcca34a1617c96
parentafd8f901b4ed41d8c33c341ebe0be5e3dd5ca7b3 (diff)
sfeed: prefer published over updated
It was useful to kept track of updated news articles for example, sadly some sites (like youtube) bump the "updated" timestamp everytime a user likes a video or farts. This makes it totally useless and messes up the sort order of "news". Now prefer "published" over "updated" for Atom feeds.
-rw-r--r--sfeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed.c b/sfeed.c
index ff978eb..58c70fe 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -566,8 +566,8 @@ xml_handler_start_element(XMLParser *p, const char *name, size_t namelen)
}
} else if (ctx.item.feedtype == FeedTypeAtom) {
if (ctx.tagid == AtomTagPublished || ctx.tagid == AtomTagUpdated) {
- /* ignore, prefer updated over published */
- if (ctx.tagid != AtomTagPublished || !ctx.item.timestamp.len) {
+ /* ignore, prefer published over updated */
+ if (ctx.tagid != AtomTagUpdated || !ctx.item.timestamp.len) {
ctx.field = &ctx.item.timestamp;
}
} else if (ctx.tagid == AtomTagTitle) {