X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=rename_series.py;h=a6b89f8aaa0da4bb28d7a56f8e9ddbcd3a256b68;hp=dd4e0fe773056bf80709a63700df545007cca989;hb=e9504c760701ba588a4848a83571f9cd6761a744;hpb=d706a2361f5ddebb688e73abc6c65cd2fcfe882c diff --git a/rename_series.py b/rename_series.py index dd4e0fe..a6b89f8 100755 --- a/rename_series.py +++ b/rename_series.py @@ -12,7 +12,7 @@ import pprint FORMAT = "%%(series_name)s - [%%(season)0%(logmaxseason)sdx%%(episode)0%(logmaxepisode)sd] - %%(title)s.%%(extension)s" -SEASONEPISODE_REGEXP = ur"^(?P([A-Za-z0-9_-]+(\.| ))+)(S|\[)(?P\d+)(E|x)(?P\d+).*\.(?P[a-z0-9]*)$" +SEASONEPISODE_REGEXP = ur"^(?P([A-Za-z0-9_-]+(\.| ))+)(S|- \[)(?P\d+)(E|x)(?P\d+).*\.(?P[a-z0-9]*)$" sep_re = re.compile(SEASONEPISODE_REGEXP) def get_titles(filename, debug=False, oneintwo=False):