Handle news feeds with empty date and update them correctly
This commit is contained in:
parent
b5a4023a7d
commit
0fcc460312
2 changed files with 6 additions and 3 deletions
|
@ -100,8 +100,11 @@ feed_get_element_date (FeedParser* fparser)
|
||||||
SoupDate* sdate;
|
SoupDate* sdate;
|
||||||
|
|
||||||
sdate = soup_date_new_from_string (content);
|
sdate = soup_date_new_from_string (content);
|
||||||
|
if (sdate)
|
||||||
|
{
|
||||||
date = soup_date_to_time_t (sdate);
|
date = soup_date_to_time_t (sdate);
|
||||||
soup_date_free (sdate);
|
soup_date_free (sdate);
|
||||||
|
}
|
||||||
g_free (content);
|
g_free (content);
|
||||||
}
|
}
|
||||||
return ((gint64)date);
|
return ((gint64)date);
|
||||||
|
|
|
@ -76,7 +76,7 @@ rss_update (FeedParser* fparser)
|
||||||
fparser->node = child;
|
fparser->node = child;
|
||||||
newdate = feed_get_element_date (fparser);
|
newdate = feed_get_element_date (fparser);
|
||||||
fparser->node = node;
|
fparser->node = node;
|
||||||
return (date != newdate);
|
return (date != newdate || date == 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
child = child->next;
|
child = child->next;
|
||||||
|
|
Loading…
Reference in a new issue