Added support for new Sprint weekend format

Added support for new Sprint weekend format:
- Added support for Sprint Shootout
- Adjusted Sprint Qualifying to Sprint Race
- Adjusted translations accordingly
Small adjustment:
- Separated Post-Qualifying Analysis and Ted's Qualifying Notebook
pull/1416/head
Tr4il 2 years ago
parent 438624499b
commit ba17b851f3

@ -29,6 +29,7 @@ terms = {
"pre": ["pre", "voorbeschouwing"],
"post": ["post", "nabeschouwing"],
"quali": ["quali", "kwalificatie"],
"shootout": ["shootout"],
"notebook": ["notebook", "notitieboekje"],
"preview": ["preview", "seizoensvoorbeschouwing"],
"summary": ["summary", "samenvatting"],
@ -41,9 +42,9 @@ names = {
"Free Practice 1": "Vrije Training 1",
"Free Practice 2": "Vrije Training 2",
"Free Practice 3": "Vrije Training 3",
"Pre-Sprint Build-up": "Sprint Voorbeschouwing",
"Post-Sprint Analysis": "Sprint Nabeschouwing",
"Sprint Qualifying": "Sprint Kwalificatie",
"Pre-Sprint Race Build-up": "Sprint Race Voorbeschouwing",
"Post-Sprint Race Analysis": "Sprint Race Nabeschouwing",
"Sprint Race Session": "Sprint Race",
"Ted's Sprint Notebook": "Ted's Sprint Notitieboekje",
"Pre-Qualifying Build-up": "Kwalificatie Voorbeschouwing",
"Post-Qualifying Analysis": "Kwalificatie Nabeschouwing",
@ -55,6 +56,10 @@ names = {
"Highlights": "Samenvatting",
"Race Session": "Race",
"Ted's Race Notebook": "Ted's Race Notitieboekje",
"Ted's Qualifying Notebook": "Ted's Kwalificatie Notitieboekje",
"Pre-Sprint Shootout Build-up": "Sprint Shootout Voorbeschouwing",
"Post-Sprint Shootout Analysis": "Sprint Shootout Nabeschouwing",
"Sprint Shootout Session": "Sprint Shootout",
}
}
@ -91,20 +96,29 @@ class Race:
output = "Free Practice 2"
elif any([x in title for x in terms["free practice 3"]]):
output = "Free Practice 3"
elif "shootout" in title:
if any([x in title for x in terms["pre"]]):
output = "Pre-Sprint Shootout Build-up"
elif any([x in title for x in terms["post"]]):
output = "Post-Sprint Shootout Analysis"
else:
output = "Sprint Shootout Session"
elif "sprint" in title:
if any([x in title for x in terms["pre"]]):
output = "Pre-Sprint Build-up"
output = "Pre-Sprint Race Build-up"
elif any([x in title for x in terms["post"]]):
output = "Post-Sprint Analysis"
output = "Post-Sprint Race Analysis"
elif any([x in title for x in terms["notebook"]]):
output = "Ted's Sprint Notebook"
else:
output = "Sprint Qualifying"
output = "Sprint Race Session"
elif any([x in title for x in terms["quali"]]):
if any([x in title for x in terms["pre"]]):
output = "Pre-Qualifying Build-up"
elif any([x in title for x in terms["post"] + terms["notebook"]]):
elif any([x in title for x in terms["post"]]):
output = "Post-Qualifying Analysis"
elif any ([x in title for x in terms["notebook"]]):
output = "Ted's Qualifying Notebook"
else:
output = "Qualifying Session"
elif any([x in title for x in terms["preview"]]):

Loading…
Cancel
Save