]> git.parisson.com Git - teleforma.git/commitdiff
Add Conference.streaming option
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 8 Apr 2019 07:16:35 +0000 (09:16 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 8 Apr 2019 07:16:35 +0000 (09:16 +0200)
teleforma/models/core.py
teleforma/views/core.py

index 4a403c9f47b7568e3095ec486bf508c3e5c9a9b4..df3cbf9d9bae6a6d173a31de8d8a37fd3747d1fd 100644 (file)
@@ -265,7 +265,7 @@ class Conference(Model):
     date_end        = DateTimeField(_('end date'), null=True, blank=True)
     readers         = ManyToManyField(User, related_name="conference", verbose_name=_('readers'),
                                         blank=True, null=True)
-
+    streaming       = models.BooleanField(_('streaming'), default=True)
     notes = generic.GenericRelation(Note)
 
     @property
index e8df5dd499dc2ca3485ac3efa76534ff35e5a7f9..227861f67cdcf8117b53e3fe87586599fd342588 100644 (file)
@@ -567,7 +567,11 @@ class ConferenceRecordView(FormView):
         status = Status()
         status.get_hosts()
 
-        stations = settings.TELECASTER_CONF
+        if conference.streaming:
+            stations = settings.TELECASTER_CONF
+        else:
+            stations = settings.TELECASTER_CONF_NO_STREAMING
+
         for station in stations:
             type = station['type']
             conf = station['conf']
@@ -589,16 +593,16 @@ class ConferenceRecordView(FormView):
                     self.snapshot('http://localhost:8080/snapshot/monitor', station.output_dir)
                 except:
                     pass
+        if conference.streaming:
+            try:
+                live_message(self.conference)
+            except:
+                pass
 
-        try:
-            live_message(self.conference)
-        except:
-            pass
-
-        try:
-            self.push()
-        except:
-            pass
+            try:
+                self.push()
+            except:
+                pass
 
         return super(ConferenceRecordView, self).form_valid(form)