Compare commits
3 Commits
f7f97595f2
...
cf1db8f746
Author | SHA1 | Date | |
---|---|---|---|
cf1db8f746 | |||
835dee0e96 | |||
27314c0c45 |
@ -414,6 +414,7 @@ class RATPWeatherModule:
|
|||||||
align_y += int(1.5 * line_height)
|
align_y += int(1.5 * line_height)
|
||||||
|
|
||||||
states = []
|
states = []
|
||||||
|
disruption = {}
|
||||||
for disruption in weather[mode][line]:
|
for disruption in weather[mode][line]:
|
||||||
status = "past"
|
status = "past"
|
||||||
for ap in disruption["applicationPeriods"]:
|
for ap in disruption["applicationPeriods"]:
|
||||||
@ -439,7 +440,7 @@ class RATPWeatherModule:
|
|||||||
|
|
||||||
state = ""
|
state = ""
|
||||||
fill = "darkgray"
|
fill = "darkgray"
|
||||||
if disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states):
|
if "scope" in disruption and disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states):
|
||||||
fill = "black"
|
fill = "black"
|
||||||
state = "_trafic_grand"
|
state = "_trafic_grand"
|
||||||
elif "PERTURBEE" in states:
|
elif "PERTURBEE" in states:
|
||||||
@ -489,10 +490,10 @@ class RATPNextStopModule:
|
|||||||
mode = tmp[0][0]
|
mode = tmp[0][0]
|
||||||
line = tmp[0][1:]
|
line = tmp[0][1:]
|
||||||
|
|
||||||
if tmp[0] == "M14":
|
if tmp[0] == "RB":
|
||||||
mint = datetime.now() + timedelta(minutes=4)
|
|
||||||
else:
|
|
||||||
mint = datetime.now() + timedelta(minutes=10)
|
mint = datetime.now() + timedelta(minutes=10)
|
||||||
|
else:
|
||||||
|
mint = datetime.now() + timedelta(minutes=4)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if 1 < len(tmp) < 4:
|
if 1 < len(tmp) < 4:
|
||||||
@ -510,7 +511,7 @@ class RATPNextStopModule:
|
|||||||
prep[s["destination"]] = []
|
prep[s["destination"]] = []
|
||||||
prep[s["destination"]].append(s)
|
prep[s["destination"]].append(s)
|
||||||
|
|
||||||
icon = IDFMAPI.get_line_icon(config, mode, line, int(line_height*(1.5 if len(prep.keys()) > 1 else 1)))
|
icon = IDFMAPI.get_line_icon(config, mode, line, int(line_height*(1.5 if len(prep.keys()) > 1 else 1)), "black")
|
||||||
image.paste(icon, (0 if len(prep.keys()) > 1 else int(line_height * 1.5 / 2 - icon.width / 2), align), icon)
|
image.paste(icon, (0 if len(prep.keys()) > 1 else int(line_height * 1.5 / 2 - icon.width / 2), align), icon)
|
||||||
|
|
||||||
max_dest = 64
|
max_dest = 64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user