fix handle embedding file not found

This commit is contained in:
Simon 2026-01-25 18:26:50 +07:00
parent 8b3db0e78f
commit c00f3888d9
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 4 additions and 0 deletions

View File

@ -219,6 +219,10 @@ class ThumbManager(ThumbManagerBase):
def embed_video_art(self, json_data: dict):
"""embed video artwork"""
file_path = os.path.join(self.MEDIA_DIR, json_data["media_url"])
if not os.path.exists(file_path):
print(f"{self.item_id}: skip art embed, file not found")
return
video = MP4(file_path)
thumb_path = self.vid_thumb_path(absolute=True)