Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set "Current.Location" property for weather addon so that skins like …

…transparency can show the location name on the home screen.
  • Loading branch information...
commit c889acc63a4a0e3d4cb8c7b1e66399ed9b0f6873 1 parent e82e22a
@mikrohard authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 addons/weather.wunderground/default.py
View
4 addons/weather.wunderground/default.py
@@ -103,6 +103,10 @@ def forecast(city):
def properties(query):
weathercode = WEATHER_CODES[query['current_observation']['icon_url'][31:-4]]
+ location = __addon__.getSetting('Location%s' % sys.argv[1])
+ if (location == '') and (sys.argv[1] != '1'):
+ location = __addon__.getSetting('Location1')
+ set_property('Current.Location' , location)
set_property('Current.Condition' , query['current_observation']['weather'])
set_property('Current.Temperature' , str(query['current_observation']['temp_c']))
set_property('Current.Wind' , str(query['current_observation']['wind_kph']))
Please sign in to comment.
Something went wrong with that request. Please try again.