add fallback thumb for queue, add ta_download to thumb validator
This commit is contained in:
parent
02bb52f276
commit
42a8ae2e9f
|
|
@ -359,6 +359,9 @@ class PendingList(PendingIndex):
|
|||
if "thumbnail" in video_data:
|
||||
return video_data["thumbnail"]
|
||||
|
||||
if video_data.get("thumbnails"):
|
||||
return video_data["thumbnails"][-1]["url"]
|
||||
|
||||
return None
|
||||
|
||||
def __extract_published(self, video_data) -> str | int | None:
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class ValidatorCallback:
|
|||
def run(self):
|
||||
"""run the task for page"""
|
||||
print(f"{self.index_name}: validate artwork")
|
||||
if self.index_name == "ta_video":
|
||||
if self.index_name in ["ta_video", "ta_download"]:
|
||||
self._validate_videos()
|
||||
elif self.index_name == "ta_channel":
|
||||
self._validate_channels()
|
||||
|
|
@ -325,6 +325,13 @@ class ThumbValidator:
|
|||
},
|
||||
"name": "ta_playlist",
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"query": {"term": {"status": {"value": "pending"}}},
|
||||
"_source": ["youtube_id", "vid_thumb_url"],
|
||||
},
|
||||
"name": "ta_download",
|
||||
},
|
||||
]
|
||||
|
||||
def __init__(self, task=False):
|
||||
|
|
|
|||
Loading…
Reference in New Issue