fix thumbnail validation with new PendingList class

This commit is contained in:
simon 2022-03-19 14:27:37 +07:00
parent 89428297c9
commit b68a00073f
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 2 additions and 2 deletions

View File

@ -52,6 +52,7 @@ class PendingIndex:
def get_indexed(self): def get_indexed(self):
"""get a list of all videos indexed""" """get a list of all videos indexed"""
self.all_videos = []
data = { data = {
"query": {"match_all": {}}, "query": {"match_all": {}},
"sort": [{"published": {"order": "desc"}}], "sort": [{"published": {"order": "desc"}}],

View File

@ -60,6 +60,7 @@ class ThumbManager:
all_thumbs = self.get_all_thumbs() all_thumbs = self.get_all_thumbs()
pending = queue.PendingList() pending = queue.PendingList()
pending.get_download()
pending.get_indexed() pending.get_indexed()
needed_thumbs = [] needed_thumbs = []
@ -72,8 +73,6 @@ class ThumbManager:
else: else:
needed_thumbs.append((youtube_id, thumb_url)) needed_thumbs.append((youtube_id, thumb_url))
pending.get_download()
for video in pending.all_pending + pending.all_ignored: for video in pending.all_pending + pending.all_ignored:
youtube_id = video["youtube_id"] youtube_id = video["youtube_id"]
thumb_url = video["vid_thumb_url"] thumb_url = video["vid_thumb_url"]