From 2eb23f460063b343d822b7738bd52a3cd8af7d7b Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Tue, 29 Apr 2014 11:55:15 +0200 Subject: [PATCH] Add sha1 argument in FileDecoder --- timeside/decoder/file.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/timeside/decoder/file.py b/timeside/decoder/file.py index 62d8ecf..88bedc1 100644 --- a/timeside/decoder/file.py +++ b/timeside/decoder/file.py @@ -50,7 +50,7 @@ class FileDecoder(Decoder): def id(): return "gst_dec" - def __init__(self, uri, start=0, duration=None, stack=False): + def __init__(self, uri, start=0, duration=None, stack=False, sha1=None): """ Construct a new FileDecoder @@ -71,7 +71,11 @@ class FileDecoder(Decoder): self.stack = stack self.uri = get_uri(uri) - self._sha1 = get_sha1(uri) + + if not sha1: + self._sha1 = get_sha1(uri) + else: + self._sha1 = sha1 self.uri_total_duration = get_media_uri_info(self.uri)['duration'] -- 2.39.5