skip embed_metadata on failed import

This commit is contained in:
Simon 2025-12-13 16:23:00 +07:00
parent afbf7ea6fa
commit 8d3b7dc341
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 3 additions and 2 deletions

View File

@ -86,8 +86,9 @@ class Scanner:
],
progress=(idx + 1) / total,
)
index_new_video(youtube_id)
YoutubeVideo(youtube_id).embed_metadata()
json_data = index_new_video(youtube_id)
if json_data:
YoutubeVideo(youtube_id).embed_metadata()
comment_list = CommentList(task=self.task)
comment_list.add(video_ids=list(self.to_index))