more cleaning in showname_encoder

This commit is contained in:
simon 2021-04-20 16:29:17 +07:00
parent be4ffe1bc5
commit 677ed49fad
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ def split_file_name(filename):
def showname_encoder(showname):
""" encodes showname for best possible match """
# tvmaze doesn't like years in showname
showname = showname.strip().rstrip('.')
showname = showname.strip().rstrip('.').rstrip('-').strip()
year_pattern = re.compile(r'\(?[0-9]{4}\)?')
year = year_pattern.findall(showname)
if year: