fix tv extractor error where showname = year

This commit is contained in:
simon 2021-12-29 23:13:56 +07:00
parent 161b8326be
commit 0d5e77d0ac
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ class Static:
showname = showname.strip().rstrip('-').rstrip(".").strip().lower()
year_pattern = re.compile(r'\(?[0-9]{4}\)?')
year = year_pattern.findall(showname)
if year:
if year and year[0] != showname:
showname = showname.replace(year[0], '').replace("..", ".")
# find acronym
acronym = [i for i in showname.split(".") if len(i) == 1]