diff options
| author | 2017-09-03 06:20:41 +0100 | |
|---|---|---|
| committer | 2017-09-03 06:20:41 +0100 | |
| commit | 5dcbfe588d9433cb1119b6aa231741368428e3b0 (patch) | |
| tree | ebdf9c36fe818fa7ab5f947b5034142e5a1f1c77 /modules | |
| parent | NR: Shorten times (diff) | |
| signature | ||
Increase default period
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nr.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/nr.py b/modules/nr.py index 6ec3fe75..6327a7ac 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -138,12 +138,13 @@ class Module(object): "plat": ('', lambda x: len(x) <= 3), "type": ("departure", lambda x: x in ["departure", "arrival", "both"]), "terminating": (False, lambda x: type(x)==type(True)), - "period": (30, lambda x: x.isdigit() and 1 <= int(x) <= 480, lambda x: int(x)), + "period": (120, lambda x: x.isdigit() and 1 <= int(x) <= 480, lambda x: int(x)), "nonpassenger": (False, lambda x: type(x)==type(True)), "time": ("", lambda x: len(x)==4 and x.isdigit()), "tops": (None, lambda x: len(x)<4 and x.isdigit()), "power": (None, lambda x: x.upper() in ["EMU", "DMU", "HST", "D", "E"], lambda x: x.upper()), - "crs": (False, lambda x: type(x)==type(True)) + "crs": (False, lambda x: type(x)==type(True)), + "st": (False, lambda x: type(x)==type(True)) }) if filter["errors"]: @@ -267,7 +268,7 @@ class Module(object): "?" if "platformsAreUnreliable" in query and query["platformsAreUnreliable"] else '', t["times"][filter["type"]]["prefix"].replace(filter["type"][0], '') if not t["cancelled"] else "", Utils.color(colours[t["times"][filter["type"]]["status"]]), - t["times"][filter["type"]]["shortest"], + t["times"][filter["type"]]["shortest"*filter["st"] or "short"], Utils.color(Utils.FONT_RESET) ) for t in trains_filtered]) |
