Add files via upload

This commit is contained in:
Alex
2018-05-27 19:54:52 +02:00
committed by GitHub
parent 3fe4f99e40
commit 5e49b8b6e1
3 changed files with 22 additions and 5 deletions
+3 -3
View File
@@ -458,14 +458,14 @@ def get_season_and_episode(title):
"""
filename = ""
patrons = ["(\d+)x(\d+)", "(\d+)×(\d+)", "(?:s|t)(\d+)e(\d+)",
"(?:season|temp\w*)\s*(\d+)\s*(?:capitulo|epi\w*)\s*(\d+)"]
patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:s|t)(\d+)e(\d+)",
"(?:season|temp\w*)\s*(\d+)\s*(?:capitulo|epi|episode\w*)\s*(\d+)"]
for patron in patrons:
try:
matches = re.compile(patron, re.I).search(title)
if matches:
filename = matches.group(1) + "x" + matches.group(2).zfill(2)
filename = matches.group(1).lstrip('0') + "x" + matches.group(2).zfill(2)
break
except:
pass