mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
_formatname: in some cases we dont have the episode and only season.
we want to have like "name.s01.new.stuff.service.id.ext" its better than "name.new.stuff.service.id.ext"
This commit is contained in:
parent
fbffce1c12
commit
2a94b927d0
@ -163,7 +163,10 @@ def _formatname(output, config, extension):
|
||||
|
||||
# Remove all {text} we cant replace with something
|
||||
for item in re.findall("([\.\-](([^\.\-]+\w+)?\{[\w\-]+\}))", name):
|
||||
name = name.replace(item[0], "")
|
||||
if output["season"] and re.search("(e\{[\w\-]+\})", name):
|
||||
name = name.replace(re.search("(e\{[\w\-]+\})", name).group(1), "")
|
||||
else:
|
||||
name = name.replace(item[0], "")
|
||||
|
||||
return name
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user