From ba5b01cc56ab2d99f51ee3b6bd21bac90e2c806d Mon Sep 17 00:00:00 2001 From: enkore Date: Tue, 26 Mar 2013 13:48:34 +0100 Subject: YoutubeCom: fix program flow quirks --- module/plugins/hoster/YoutubeCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index f01094c7d..ce9fe4945 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -139,7 +139,8 @@ class YoutubeCom(Hoster): pyfile.name = html_unescape(name) time = re.search(r"t=((\d+)m)?(\d+)s", pyfile.url) - if time: + ffmpeg = which("ffmpeg") + if ffmpeg and time: m, s = time.groups()[1:] if not m: m = "0" @@ -148,8 +149,7 @@ class YoutubeCom(Hoster): filename = self.download(url) - ffmpeg = which("ffmpeg") - if ffmpeg: + if ffmpeg and time: inputfile = filename + "_" os.rename(filename, inputfile) -- cgit v1.2.3