1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-07 13:04:01 +02:00

Allow to have a R in front of subtitles

This commit is contained in:
Yohann D'ANELLO
2020-10-02 16:43:04 +02:00
parent 838fcecb56
commit 8fa724e848
2 changed files with 6 additions and 2 deletions

View File

@ -59,6 +59,7 @@ def generate_side_identifier(title, authors, subtitle=None):
subtitle = re.sub(r'</span>', '', subtitle)
subtitle = re.sub(r'<span.*>', '', subtitle)
start = subtitle.split(' ')[0].replace('.', '')
start = re.sub("^R?", "", start)
if start.isnumeric():
side_identifier += " {:0>2}".format(start, )