mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-07 15:19:33 +00:00
validate expected keys for adding to queue
This commit is contained in:
@@ -324,6 +324,19 @@ class PendingList(PendingIndex):
|
||||
)
|
||||
return None
|
||||
|
||||
expected_keys = {"id", "title", "channel", "channel_id"}
|
||||
if not set(video.youtube_meta.keys()).issuperset(expected_keys):
|
||||
print(f"{url}: video metadata extraction incomplete, skipping")
|
||||
if self.task:
|
||||
self.task.send_progress(
|
||||
message_lines=[
|
||||
"Video extraction failed.",
|
||||
"Metadata extraction incomplete.",
|
||||
],
|
||||
level="error",
|
||||
)
|
||||
return None
|
||||
|
||||
video.youtube_meta["vid_type"] = vid_type
|
||||
to_add = self._parse_entry(
|
||||
youtube_id=url,
|
||||
|
||||
Reference in New Issue
Block a user