From fc2dfa14435a1561460c28c7a9160402ab0cc174 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 29 May 2026 10:00:28 +0200 Subject: [PATCH] add check --- .../teleforma-import-conferences-4.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/teleforma/management/commands/teleforma-import-conferences-4.py b/teleforma/management/commands/teleforma-import-conferences-4.py index bb90ac69..77503dab 100644 --- a/teleforma/management/commands/teleforma-import-conferences-4.py +++ b/teleforma/management/commands/teleforma-import-conferences-4.py @@ -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: -- 2.47.3