mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-09-17 16:52:47 +00:00
transitous rewrite: remove ID from some german regional trains
the API gave a name like RB69 (IDNUMBERS) for RE and RB trains
This commit is contained in:
@@ -27,6 +27,8 @@ def channel_formatting(mode: str) -> str:
|
||||
def get_train_name(train_name: str, mode: str) -> str:
|
||||
if train_name.isdigit():
|
||||
train = f"{mode.capitalize()} {train_name}"
|
||||
elif "(" in train_name:
|
||||
train = train_name.split(" (")[0]
|
||||
else:
|
||||
train = train_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user