From ede101e112e2a14cbe3c14bd68db47118e1c3f2d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 13 Sep 2013 16:42:32 +0200 Subject: [PATCH] dont fail with audio files --- pandora_client/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 1e64ee5..846e3de 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -53,6 +53,8 @@ def encode(filename, prefix, profile, info=None, extract_frames=True): cache = os.path.join(prefix, os.path.join(*utils.hash_prefix(oshash))) if info.get('video') and extract_frames: frames = get_frames(filename, prefix, info) + else: + frames = [] if info.get('video') or info.get('audio'): media_f = os.path.join(cache, profile) if not os.path.exists(media_f) \