]> git.parisson.com Git - teleforma.git/commitdiff
No sub directory for stream server, use settings to define stream servers
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Mar 2019 22:40:33 +0000 (23:40 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Mar 2019 22:40:33 +0000 (23:40 +0100)
teleforma/models/core.py
teleforma/views/core.py

index c091edee57e72f01ec6beb8ca6b1266996c365a1..b8ad93a8ae8c0311f715a43608894893b23c7b49 100644 (file)
@@ -236,7 +236,7 @@ class Course(Model):
         """
         periods = [ p['id'] for p in self.periods.values('id') ]
         return not periods or period.id in periods
-        
+
     class Meta(MetaCore):
         db_table = app_label + '_' + 'course'
         verbose_name = _('course')
@@ -499,7 +499,7 @@ class LiveStream(Model):
 
     @property
     def mount_point(self):
-        mount_point = self.server.type
+        mount_point = self.server.type
         if self.server.type == 'stream-m':
             mount_point += '/consume/' + self.slug
         else:
index de08839bfb92ed88076abf558f452b56c8264cdf..3ae415e921d18df3aafd2a0d25b92aa6a74ab6d0 100644 (file)
@@ -759,9 +759,12 @@ class ConferenceRecordView(FormView):
 
                 for stream in conf_dict['streams']:
                     host = getattr(settings, "TELECASTER_LIVE_STREAMING_SERVER", stream['host'])
-                    port = getattr(settings, "TELECASTER_LIVE_STREAMING_PORT", stream['port'])
                     server_type = stream['server_type']
                     stream_type = stream['stream_type']
+                    if server_type == 'icecast':
+                        port = getattr(settings, "TELECASTER_LIVE_ICECAST_STREAMING_PORT", stream['port'])
+                    elif server_type == 'stream-m':
+                        port = getattr(settings, "TELECASTER_LIVE_STREAM_M_STREAMING_PORT", stream['port'])
                     #site = Site.objects.all()[0]
                     server, c = StreamingServer.objects.get_or_create(host=host,
                                                                       port=port,