From: Thomas Fillon Date: Tue, 29 Apr 2014 09:55:15 +0000 (+0200) Subject: Add sha1 argument in FileDecoder X-Git-Tag: 0.5.5~1^2~33^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2eb23f460063b343d822b7738bd52a3cd8af7d7b;p=timeside.git Add sha1 argument in FileDecoder --- 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']