Meilleur affichage et plus rapide
This commit is contained in:
9
tcl.py
9
tcl.py
@@ -160,7 +160,7 @@ class Tcl(Plugin):
|
|||||||
Ids.append(value["id"])
|
Ids.append(value["id"])
|
||||||
|
|
||||||
|
|
||||||
url = 'https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=2000&start=1'
|
url = 'https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=30000&start=1'
|
||||||
respText = "### Prochains départs " + nomArret + " :\n"
|
respText = "### Prochains départs " + nomArret + " :\n"
|
||||||
self.log.info(respText)
|
self.log.info(respText)
|
||||||
lines = []
|
lines = []
|
||||||
@@ -196,8 +196,11 @@ class Tcl(Plugin):
|
|||||||
elif value["coursetheorique"].split('-')[0] == "302A" :
|
elif value["coursetheorique"].split('-')[0] == "302A" :
|
||||||
transport = "B"
|
transport = "B"
|
||||||
else:
|
else:
|
||||||
transport = value["coursetheorique"].split('-')[0][:-1]
|
l = value["coursetheorique"].split('-')[0]
|
||||||
|
if l[-1:].isdigit():
|
||||||
|
transport = l
|
||||||
|
else:
|
||||||
|
transport = value["coursetheorique"].split('-')[0][:-1]
|
||||||
found = False
|
found = False
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line.get_name() == transport:
|
if line.get_name() == transport:
|
||||||
|
|||||||
Reference in New Issue
Block a user