This commit is contained in:
jr-k 2024-08-24 20:58:47 +02:00
parent d38c72e4d6
commit c00d967159
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ class ContentManager(ModelManager):
def set_metadata(self, content: Content) -> str: def set_metadata(self, content: Content) -> str:
if content.type == ContentType.VIDEO: if content.type == ContentType.VIDEO:
duration, width, height = get_video_metadata(content.location) width, height, duration = get_video_metadata(content.location)
content.duration = duration content.duration = duration
content.set_metadata(ContentMetadata.DURATION, duration) content.set_metadata(ContentMetadata.DURATION, duration)
content.set_metadata(ContentMetadata.WIDTH, width) content.set_metadata(ContentMetadata.WIDTH, width)

View File

@ -18,4 +18,4 @@ def get_video_metadata(filename):
width = fields.get('width', 0) width = fields.get('width', 0)
height = fields.get('height', 0) height = fields.get('height', 0)
return duration, width, height return width, height, duration