Remember the filtered output, not the entire service list for !nrservice
This commit is contained in:
parent
60a728f959
commit
e924d492d0
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,6 @@ class Module(object):
|
||||||
|
|
||||||
trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", "")))
|
trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", "")))
|
||||||
|
|
||||||
self.result_map[event["target"].id] = trains
|
|
||||||
|
|
||||||
trains_filtered = []
|
trains_filtered = []
|
||||||
train_dest_plat = []
|
train_dest_plat = []
|
||||||
|
@ -79,6 +78,8 @@ class Module(object):
|
||||||
train_dest_plat.append((train["dest_name"] + train["via"], train["platform"]))
|
train_dest_plat.append((train["dest_name"] + train["via"], train["platform"]))
|
||||||
trains_filtered.append(train)
|
trains_filtered.append(train)
|
||||||
|
|
||||||
|
self.result_map[event["target"].id] = trains_filtered
|
||||||
|
|
||||||
trains_string = ", ".join(["%s (plat %s, %s%s%s)" % (t["dest_via"], t["platform"],
|
trains_string = ", ".join(["%s (plat %s, %s%s%s)" % (t["dest_via"], t["platform"],
|
||||||
Utils.color(Utils.COLOR_GREEN if t["on_time"] else Utils.COLOR_RED),
|
Utils.color(Utils.COLOR_GREEN if t["on_time"] else Utils.COLOR_RED),
|
||||||
t["time"],
|
t["time"],
|
||||||
|
|
Loading…
Reference in a new issue