]> git.parisson.com Git - teleforma.git/commitdiff
fix
authoryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 17:20:16 +0000 (19:20 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 17:20:16 +0000 (19:20 +0200)
teleforma/views.py

index 3edd08b43e3f7a5cc2c65ae253dfe2e93122e0aa..4a32c2bcd7206f6f3ee6cdb780ee8be92ddf6497 100755 (executable)
@@ -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())