From 08c2e67f0a242cc179fbaac4258888eaf5e44b10 Mon Sep 17 00:00:00 2001 From: yomguy Date: Wed, 18 Jul 2012 19:20:16 +0200 Subject: [PATCH] fix --- teleforma/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()) -- 2.39.5