#FILE_PROTECTION_METHOD = 'xsendfile'
-TELECASTER_CONF = '/etc/telecaster/telecaster.xml'
+TELECASTER_CONF = '/etc/telecaster/deefuzzer_mp3.xml'
import mimetypes
import datetime
+import random
from jsonrpc import jsonrpc_method
return host
+def get_random_hash():
+ hash = random.getrandbits(128)
+ return "%032x" % hash
+
+
class CourseView(DetailView):
model = Course
for stream in conference.livestream.all():
stream.delete()
for station in conference.station.all():
+ station.started = False
+ station.save()
station.stop()
- station.delete()
- @method_decorator(login_required)
def dispatch(self, *args, **kwargs):
return super(ConferenceView, self).dispatch(*args, **kwargs)
def form_valid(self, form):
form.save()
+ uuid = get_random_hash()
self.conference = form.instance
self.conference.date_begin = datetime.datetime.now()
+ self.conference.public_id = uuid
self.conference.save()
- station = Station(conference=self.conference)
+ station = Station(conference=self.conference, public_id=uuid)
station.setup(settings.TELECASTER_CONF)
station.start()
station.save()