minor
This commit is contained in:
parent
d38c72e4d6
commit
c00d967159
@ -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)
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user