fix restore_artwork call, create folders

This commit is contained in:
Simon 2025-12-28 09:42:46 +07:00
parent ea3930b76a
commit f278e252c5
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,7 @@ class IndexFromEmbed:
self.archive_video(video)
self.index_subtitles(json_embed, video)
self.index_comments(json_embed)
self.restore_artwork(video)
return video.json_data
@ -249,6 +250,10 @@ class IndexFromEmbed:
# is not embedded
return
art_folder = os.path.dirname(target_path)
if not os.path.exists(art_folder):
os.mkdir(art_folder)
with open(target_path, "wb") as f:
f.write(bytes(art_item[0]))