Compare commits
2 commits
bbda54a31e
...
f7f97595f2
Author | SHA1 | Date | |
---|---|---|---|
f7f97595f2 | |||
b334376ea0 |
1 changed files with 7 additions and 3 deletions
|
@ -483,13 +483,17 @@ class RATPNextStopModule:
|
|||
|
||||
align = 0
|
||||
|
||||
mint = datetime.now() + timedelta(minutes=10)
|
||||
|
||||
api = IDFMAPI(config)
|
||||
for stop in stops:
|
||||
tmp = stop.split("/", 2)
|
||||
mode = tmp[0][0]
|
||||
line = tmp[0][1:]
|
||||
|
||||
if tmp[0] == "M14":
|
||||
mint = datetime.now() + timedelta(minutes=4)
|
||||
else:
|
||||
mint = datetime.now() + timedelta(minutes=10)
|
||||
|
||||
try:
|
||||
if 1 < len(tmp) < 4:
|
||||
prep = {}
|
||||
|
@ -507,7 +511,7 @@ class RATPNextStopModule:
|
|||
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)))
|
||||
image.paste(icon, (0, 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
|
||||
for dest, msgs in prep.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue