From 138995925ebbd600e52ba2e441fa62c7094a7650 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 3 Jun 2018 18:03:09 +0200 Subject: [PATCH] _formatname: check if we have season in output --- lib/svtplay_dl/utils/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/svtplay_dl/utils/output.py b/lib/svtplay_dl/utils/output.py index c365e77..3d2fcc7 100644 --- a/lib/svtplay_dl/utils/output.py +++ b/lib/svtplay_dl/utils/output.py @@ -163,7 +163,7 @@ def _formatname(output, config, extension): # Remove all {text} we cant replace with something for item in re.findall("([\.\-](([^\.\-]+\w+)?\{[\w\-]+\}))", name): - if output["season"] and re.search("(e\{[\w\-]+\})", name): + if "season" in output and output["season"] and re.search("(e\{[\w\-]+\})", name): name = name.replace(re.search("(e\{[\w\-]+\})", name).group(1), "") else: name = name.replace(item[0], "")