From: Vincent Le Gallic Date: Thu, 11 Jun 2015 02:19:50 +0000 (+0200) Subject: [rename_series] légère modif de la regexp comme ça l'opération est involutive X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=6eae26fa0c1247c9fbf1f93f3e962d914b31e510;p=scripts-20-100.git [rename_series] légère modif de la regexp comme ça l'opération est involutive --- 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):