]> git.parisson.com Git - teleforma.git/commitdiff
fix media path
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 8 Jul 2026 21:32:31 +0000 (23:32 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 8 Jul 2026 21:32:31 +0000 (23:32 +0200)
teleforma/models/core.py

index 3d6447f6a34d13c4123416250b43e4fe58adf763..3c3faddbcd5b7debf9fa7553bcde9046aaa17a82 100644 (file)
@@ -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)