]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
[rename_series] On autorise () dans le nom de la série
authorVincent Le Gallic <legallic@crans.org>
Wed, 4 Jan 2017 10:29:46 +0000 (11:29 +0100)
committerVincent Le Gallic <legallic@crans.org>
Wed, 4 Jan 2017 10:30:22 +0000 (11:30 +0100)
et le [ avant SsxEee devient facultatif

rename_series.py

index 4bc4c81769f131f5309124d85a42f0078bb3eb89..efeeb5ed62440d146c9abd2ab6c456898267436c 100755 (executable)
@@ -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<series_name>([A-Za-z0-9_-]+(\.| ))+)(S|- \[)(?P<season>\d+)(E|x)(?P<episode>\d+).*\.(?P<extension>[a-z0-9]*)$"
+SEASONEPISODE_REGEXP = ur"^(?P<series_name>([A-Za-z0-9_()-]+(\.| ))+)(S|- \[?)(?P<season>\d+)(E|x)(?P<episode>\d+).*\.(?P<extension>[a-z0-9]*)$"
 sep_re = re.compile(SEASONEPISODE_REGEXP)
 
 def get_titles(filename, debug=False, oneintwo=False):