From: yomguy Date: Wed, 18 Jul 2012 17:20:16 +0000 (+0200) Subject: fix X-Git-Tag: 0.7-dev^2~86 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=08c2e67f0a242cc179fbaac4258888eaf5e44b10;p=teleforma.git fix --- diff --git a/teleforma/views.py b/teleforma/views.py index 3edd08b4..4a32c2bc 100755 --- a/teleforma/views.py +++ b/teleforma/views.py @@ -401,12 +401,13 @@ class ConferenceRecordView(FormView): stream_type=type, streaming=True) stream.save() if server_type == 'stream-m': - self.snapshot(stream, station.output_dir) + self.snapshot(stream.snapshot_url, station.output_dir) return super(ConferenceRecordView, self).form_valid(form) - def snapshot(self, stream, dir): - img = urllib.urlopen(stream.snapshot_url) + def snapshot(self, url, dir): + print url + img = urllib.urlopen(url) path = dir + os.sep + 'preview.webp' f = open(path, 'w') f.write(img.read())