From c3098fe163e836f635c22c1c855d51c504c23cfd Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 8 Jul 2026 23:36:30 +0200 Subject: [PATCH] compute duration with datetime --- teleforma/models/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- 2.47.3