Output StopPointName

Signed-off-by: Markus Birth <markus@birth-online.de>
This commit is contained in:
2025-08-03 03:06:05 +01:00
parent c804467790
commit fb65eca4b4
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
<p>Last update: {{c["ura"]["gmtime"]}} GMT</p>
{% for stop_id in c["stops"] %}
{% set s = c["stops"][stop_id] %}
<h1>{{s["name"]}}</h1>
<h1>{{s["name"]}} (Stop: {{s["stop"]}})</h1>
<div class="towards">(Towards: <b>{{s["towards"]}}</b>)</div>
{% for m in s["messages"] %}
<p class="message">{{m}}</p>

View File

@@ -19,7 +19,7 @@ class TflCountdown:
def __init__(self, api_key: str):
self.api_key = api_key
self.return_list = ["StopPointName", "StopID", "Towards", "LineName", "DestinationText", "EstimatedTime", "MessageText"]
self.return_list = ["StopID", "StopPointName", "StopPointIndicator", "Towards", "LineName", "DestinationText", "EstimatedTime", "MessageText"]
self.stop_ids = ["1597", "1598", "11333", "11334"]
self.time_now = time.gmtime() * 1000
@@ -102,6 +102,7 @@ class TflCountdown:
result["stops"][stop_id] = {
"id": stop_id,
"name": self.get_field(ld, "StopPointName"),
"stop": self.get_field(ld, "StopPointIndicator"),
"towards": self.get_field(ld, "Towards"),
"lines": {},
"messages": []