From 27673e847d340a2cbf0ccf6e55354d1bdada4728 Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 4 Jun 2020 09:29:40 +0200 Subject: [PATCH] fix old videos from showing up in subscriptions --- app/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common.py b/app/common.py index b221a35..c17425a 100644 --- a/app/common.py +++ b/app/common.py @@ -63,7 +63,7 @@ def update_channel(db, xmldata): for video in videos: now = datetime.now(timezone.utc) updated = dateutil.parser.parse(video['updated']) - published = dateutil.parser.parse(video['updated']) + published = dateutil.parser.parse(video['published']) # if update and published time are near-identical, it's new. use crawl time if it was published within a week. # else, it's just an update to an older video (before we subscribed, so use original upload time). if (updated - published).seconds < 60 and (now - published).days < 7: -- 2.39.3