From: Guillaume Pellerin Date: Fri, 29 May 2026 08:00:28 +0000 (+0200) Subject: add check X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fc2dfa14435a1561460c28c7a9160402ab0cc174;p=teleforma.git add check --- 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: