]> git.parisson.com Git - teleforma.git/commitdiff
add check
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 29 May 2026 08:00:28 +0000 (10:00 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 29 May 2026 08:00:28 +0000 (10:00 +0200)
teleforma/management/commands/teleforma-import-conferences-4.py

index bb90ac694f5bce8cf2854006052c6059d56e66f2..77503dabe1c0ce2eaa7fe3f29b5101ba914e8ebb 100644 (file)
@@ -59,7 +59,24 @@ class Command(BaseCommand):
                     conference.course.course_type]),
                 conference.public_id])
 
-            if os.path.exists(conf_dir):
+            # check
+            exist = False
+            medias = conference.media.all()
+            for media in medias:
+                if media.file == path:
+                    exist = True
+                    break
+
+            streaming = False
+            try:
+                stations = conference.station.filter(started=True, public_id=public_id)
+                if stations:
+                    streaming = True
+            except:
+                pass
+
+            # omport
+            if os.path.exists(conf_dir) and not exist and not streaming:
                 files = os.listdir(conf_dir)
 
                 for media_format in media_formats: