X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=rename_series.py;h=efeeb5ed62440d146c9abd2ab6c456898267436c;hp=4bc4c81769f131f5309124d85a42f0078bb3eb89;hb=6b840fc4cf2bb1ca92363f65c2596454c7c81f80;hpb=e5b4326006a31765e933303617d3628eaf20fbfd diff --git a/rename_series.py b/rename_series.py index 4bc4c81..efeeb5e 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):