diff --git a/modules/ratp.py b/modules/ratp.py index 90221e7..ceff3f6 100644 --- a/modules/ratp.py +++ b/modules/ratp.py @@ -414,7 +414,6 @@ class RATPWeatherModule: align_y += int(1.5 * line_height) states = [] - disruption = {} for disruption in weather[mode][line]: status = "past" for ap in disruption["applicationPeriods"]: @@ -440,7 +439,7 @@ class RATPWeatherModule: state = "" fill = "darkgray" - if "scope" in disruption and disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states): + if disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states): fill = "black" state = "_trafic_grand" elif "PERTURBEE" in states: @@ -490,10 +489,10 @@ class RATPNextStopModule: mode = tmp[0][0] line = tmp[0][1:] - if tmp[0] == "RB": - mint = datetime.now() + timedelta(minutes=10) - else: + if tmp[0] == "M14": mint = datetime.now() + timedelta(minutes=4) + else: + mint = datetime.now() + timedelta(minutes=10) try: if 1 < len(tmp) < 4: @@ -511,7 +510,7 @@ class RATPNextStopModule: prep[s["destination"]] = [] 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)), "black") + icon = IDFMAPI.get_line_icon(config, mode, line, int(line_height*(1.5 if len(prep.keys()) > 1 else 1))) image.paste(icon, (0 if len(prep.keys()) > 1 else int(line_height * 1.5 / 2 - icon.width / 2), align), icon) max_dest = 64