]> git.parisson.com Git - teleforma.git/commitdiff
use right video poster
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 22 Apr 2024 08:47:33 +0000 (10:47 +0200)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 22 Apr 2024 08:47:33 +0000 (10:47 +0200)
teleforma/management/commands/teleforma-import-conferences-2.py

index 1a7bd5c753d5cd4ed2ce9d498aed238346c95b9e..16dcd07d52a204e300a8f13125b3f7b2e57bee63 100644 (file)
@@ -99,17 +99,10 @@ class Command(BaseCommand):
 
                             files = os.listdir(root)
 
-                            # TRANSCODED MEDIA
-                            for file in files:
-                                filename, extension = os.path.splitext(file)
-                                if extension[1:] in self.transcoded_formats:
-                                    r_path = dir + os.sep + file
-                                    t, c = MediaTranscoded.objects.get_or_create(item=media, file=r_path)
-
                             # POSTER
                             for file in files:
                                 filename, extension = os.path.splitext(file)
-                                if extension[1:] in self.image_formats:
+                                if extension[1:] in self.image_formats and filename in path:
                                     media.poster_file = dir + os.sep + file
                                     break