mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
_formatname: check if we have season in output
This commit is contained in:
parent
18b00ae673
commit
138995925e
@ -163,7 +163,7 @@ def _formatname(output, config, extension):
|
|||||||
|
|
||||||
# Remove all {text} we cant replace with something
|
# Remove all {text} we cant replace with something
|
||||||
for item in re.findall("([\.\-](([^\.\-]+\w+)?\{[\w\-]+\}))", name):
|
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), "")
|
name = name.replace(re.search("(e\{[\w\-]+\})", name).group(1), "")
|
||||||
else:
|
else:
|
||||||
name = name.replace(item[0], "")
|
name = name.replace(item[0], "")
|
||||||
|
Loading…
Reference in New Issue
Block a user