From 859d6df53ded30484e0322545f5f84fef1eee270 Mon Sep 17 00:00:00 2001 From: Lyle Hanson Date: Mon, 15 Jul 2024 10:40:22 -0400 Subject: [PATCH] [26] F1 naming updates (#2155) --- CHANGELOG | 3 ++- VERSION | 2 +- modules/ergast.py | 22 +++++++++++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1cef311c..1c458031 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ Update setuptools requirement to 70.2.0 Added [`letterboxd_user_lists`](https://kometa.wiki/en/latest/files/dynamic_types/#letterboxd-user-lists) Dynamic Collection Type # Updates +F1 session naming improvements # Defaults @@ -20,4 +21,4 @@ Fixed #2100 `verify_ssl` wasn't working when downloading images Fixed an issue with `delete_collections` where items were being deleted if they only matched one criteria vs all criteria Fixed `imdb_watchlist` -Various other Minor Fixes \ No newline at end of file +Various other Minor Fixes diff --git a/VERSION b/VERSION index 5859a5e4..6fcd9a9a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2-build25 +2.0.2-build26 diff --git a/modules/ergast.py b/modules/ergast.py index b7d6e83d..d6830eef 100644 --- a/modules/ergast.py +++ b/modules/ergast.py @@ -23,9 +23,11 @@ translations = { } terms = { - "free practice 1": ["free practice 1", "vrije training 1", "fp1", "vt1"], - "free practice 2": ["free practice 2", "vrije training 2", "fp2", "vt2"], - "free practice 3": ["free practice 3", "vrije training 3", "fp3", "vt3"], + "drivers press conference": ["drivers press conference"], + "f1 show": ["f1 show"], + "free practice 1": ["free practice 1", "free practice one", "vrije training 1", "fp1", "vt1"], + "free practice 2": ["free practice 2", "free practice two", "vrije training 2", "fp2", "vt2"], + "free practice 3": ["free practice 3", "free practice three", "vrije training 3", "fp3", "vt3"], "pre": ["pre", "voorbeschouwing"], "post": ["post", "nabeschouwing"], "quali": ["quali", "kwalificatie"], @@ -38,7 +40,9 @@ terms = { names = { "nl": { + "Drivers' Press Conference": "Drivers' Press Conference", "Formula 1 Cafe": "Formule 1 Cafe", + "F1 Show": "F1 Show", "Free Practice 1": "Vrije Training 1", "Free Practice 2": "Vrije Training 2", "Free Practice 3": "Vrije Training 3", @@ -48,13 +52,13 @@ names = { "Ted's Sprint Notebook": "Ted's Sprint Notitieboekje", "Pre-Qualifying Build-up": "Kwalificatie Voorbeschouwing", "Post-Qualifying Analysis": "Kwalificatie Nabeschouwing", - "Qualifying Session": "Kwalificatie", + "Qualifying": "Kwalificatie", "Season Preview": "Seizoensvoorbeschouwing", "Pre-Race Buildup": "Voorbeschouwing", "Post-Race Analysis": "Nabeschouwing", "Live from the Grid": "Vanaf de grid", "Highlights": "Samenvatting", - "Race Session": "Race", + "Race": "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", @@ -123,9 +127,13 @@ class Race: elif any ([x in title for x in terms["notebook"]]): output = "Ted's Qualifying Notebook" else: - output = "Qualifying Session" + output = "Qualifying" elif any([x in title for x in terms["preview"]]): output = "Season Preview" + elif any([x in title for x in terms["f1 show"]]): + output = "F1 Show" + elif any([x in title for x in terms["drivers press conference"]]): + output = "Drivers' Press Conference" elif any([x in title for x in terms["pre"]]): output = "Pre-Race Buildup" elif any([x in title for x in terms["post"]]): @@ -137,7 +145,7 @@ class Race: elif any([x in title for x in terms["notebook"]]): output = "Ted's Race Notebook" else: - output = "Race Session" + output = "Race" if "2160" in title or "4K" in title: output = f"{output} (4K)"