From: Vincent Le Gallic Date: Wed, 4 Jan 2017 10:29:46 +0000 (+0100) Subject: [rename_series] On autorise () dans le nom de la série X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=6b840fc4cf2bb1ca92363f65c2596454c7c81f80;p=scripts-20-100.git [rename_series] On autorise () dans le nom de la série et le [ avant SsxEee devient facultatif --- 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):