summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hoster/YoutubeCom.py6
1 files 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)