From 54d062900808b5646bd8e9b0ec856c0a42da90dd Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Wed, 29 Jul 2015 12:04:17 +0200 Subject: 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. --- sfeed.c | 4 ++-- 1 file 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) { -- cgit v1.2.3