Add helper function for short season number

This commit is contained in:
JonnyWong16 2021-03-04 17:59:47 -08:00
parent 390391c750
commit 84448600d2
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 7 additions and 4 deletions

View file

@ -1660,3 +1660,9 @@ def delete_file(file_path):
except OSError:
logger.error("Tautulli Helpers :: Failed to delete file: %s", file_path)
return False
def short_season(title):
if title.startswith('Season ') and title[7:].isdigit():
return 'S%s' % title[7:]
return title