From b68a00073fdbf0e9617e329247481f009447abdf Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 19 Mar 2022 14:27:37 +0700 Subject: [PATCH] fix thumbnail validation with new PendingList class --- tubearchivist/home/src/download/queue.py | 1 + tubearchivist/home/src/download/thumbnails.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tubearchivist/home/src/download/queue.py b/tubearchivist/home/src/download/queue.py index 71075a4..26d8e21 100644 --- a/tubearchivist/home/src/download/queue.py +++ b/tubearchivist/home/src/download/queue.py @@ -52,6 +52,7 @@ class PendingIndex: def get_indexed(self): """get a list of all videos indexed""" + self.all_videos = [] data = { "query": {"match_all": {}}, "sort": [{"published": {"order": "desc"}}], diff --git a/tubearchivist/home/src/download/thumbnails.py b/tubearchivist/home/src/download/thumbnails.py index fa40b40..0ce492f 100644 --- a/tubearchivist/home/src/download/thumbnails.py +++ b/tubearchivist/home/src/download/thumbnails.py @@ -60,6 +60,7 @@ class ThumbManager: all_thumbs = self.get_all_thumbs() pending = queue.PendingList() + pending.get_download() pending.get_indexed() needed_thumbs = [] @@ -72,8 +73,6 @@ class ThumbManager: else: needed_thumbs.append((youtube_id, thumb_url)) - pending.get_download() - for video in pending.all_pending + pending.all_ignored: youtube_id = video["youtube_id"] thumb_url = video["vid_thumb_url"]