From: Guillaume Pellerin Date: Wed, 8 Jul 2026 21:32:31 +0000 (+0200) Subject: fix media path X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3264b1c4ddc24f65bed67f66d021c12b3bb52114;p=teleforma.git fix media path --- diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 3d6447f6..3c3faddb 100644 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -1122,10 +1122,10 @@ class Media(MediaBase): else: return None - def set_duration(filename): + def set_duration(self): result = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", - "default=noprint_wrappers=1:nokey=1", filename], + "default=noprint_wrappers=1:nokey=1", self.file.path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) self.duration = float(result.stdout)