From: Guillaume Pellerin Date: Wed, 8 Jul 2026 21:36:30 +0000 (+0200) Subject: compute duration with datetime X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c3098fe163e836f635c22c1c855d51c504c23cfd;p=teleforma.git compute duration with datetime --- diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 2148c30b..86345197 100644 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -1129,7 +1129,7 @@ class Media(MediaBase): "default=noprint_wrappers=1:nokey=1", self.file.path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - self.duration = float(result.stdout) + self.duration = datetime.timedelta(days =-1, seconds = int(result.stdout)) class Meta(MetaCore): db_table = app_label + '_' + 'media'