weather: Improve next hour
This commit is contained in:
parent
1893e7c201
commit
452a6097e3
@ -147,8 +147,10 @@ class WeatherJumboCurrentModule:
|
|||||||
|
|
||||||
dayweather = list(itertools.islice(WeatherAPI().get_hourly(), 2))
|
dayweather = list(itertools.islice(WeatherAPI().get_hourly(), 2))
|
||||||
|
|
||||||
if dayweather[0]["weather"][0]["description"] != dayweather[1]["weather"][0]["description"]:
|
if dayweather[0]["weather"][0]["description"] != curweather["weather"][0]["description"]:
|
||||||
display_longtext(draw, (width*self.middle_align, height/1.28), dayweather[1]["weather"][0]["description"] + " la prochaine heure.\n" + thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
description = dayweather[0]["weather"][0]["description"]
|
||||||
|
description = description[0].upper() + description[1:]
|
||||||
|
display_longtext(draw, (width*self.middle_align, height/1.28), description + " la prochaine heure.\n" + thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||||
else:
|
else:
|
||||||
display_longtext(draw, (width*self.middle_align, height/1.28), thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
display_longtext(draw, (width*self.middle_align, height/1.28), thisdayweather["summary"] + ".", fill="black", anchor="lm", font=fnt_Rig, maxwidth=(1-self.middle_align)*width)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user