From: Thomas Fillon Date: Tue, 11 Apr 2017 09:12:30 +0000 (+0200) Subject: Fix item view X-Git-Tag: search~2^2~19^2~10 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5148b12c204a14e58e498695929c897f700b5077;p=telemeta.git Fix item view --- diff --git a/telemeta/views/item.py b/telemeta/views/item.py index 0e7ac666..2f6c73c7 100644 --- a/telemeta/views/item.py +++ b/telemeta/views/item.py @@ -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: