]> git.parisson.com Git - telemeta.git/commitdiff
Fix item view
authorThomas Fillon <thomas@parisson.com>
Tue, 11 Apr 2017 09:12:30 +0000 (11:12 +0200)
committerThomas Fillon <thomas@parisson.com>
Tue, 11 Apr 2017 09:12:30 +0000 (11:12 +0200)
telemeta/views/item.py

index 0e7ac666ddf76355a6b345fa8d17ffa4df6c634f..2f6c73c7a85a2968f556a0ab0f06721d1ac11a36 100644 (file)
@@ -267,9 +267,9 @@ class ItemView(ItemBaseMixin):
                 graph = grapher(width=width, height=height)
                 (decoder | graph).run()
                 graph.watermark('timeside', opacity=.6, margin=(5, 5))
-                f = open(path, 'w')
+                #f = open(path, 'w')
                 graph.render(output=path)
-                f.close()
+                #f.close()
                 self.cache_data.add_file(image_file)
 
         response = StreamingHttpResponse(self.cache_data.read_stream_bin(image_file), content_type=mime_type)
@@ -359,7 +359,7 @@ class ItemView(ItemBaseMixin):
                 if extension in mapping.unavailable_extensions:
                     metadata = None
 
-                decoder = get_processor('file_decoder')(source)
+                decoder = timeside.core.get_processor('file_decoder')(source)
                 processor = encoder(media, streaming=False,
                                     overwrite=True)
                 if metadata: