The branch, eden has been updated
       via  3c7cb09d19b8389a47aec030e6570191f7f7ea79 (commit)
      from  84fb637f1d02ed248f325244dd5393d1560337d7 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=3c7cb09d19b8389a47aec030e6570191f7f7ea79

commit 3c7cb09d19b8389a47aec030e6570191f7f7ea79
Author: ronie <[email protected]>
Date:   Mon Mar 19 01:14:19 2012 +0100

    [weather.wunderground] -v0.0.9
    
    clear properties for 7 days not 6

diff --git a/weather.wunderground/addon.xml b/weather.wunderground/addon.xml
index dbeabe4..9396393 100644
--- a/weather.wunderground/addon.xml
+++ b/weather.wunderground/addon.xml
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="weather.wunderground" name="Weather Underground" version="0.0.8" 
provider-name="Team XBMC">
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="weather.wunderground" name="Weather Underground" version="0.0.9" 
provider-name="Team XBMC">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
diff --git a/weather.wunderground/changelog.txt 
b/weather.wunderground/changelog.txt
index 7f9cc5c..f9c0fe0 100644
--- a/weather.wunderground/changelog.txt
+++ b/weather.wunderground/changelog.txt
@@ -1,5 +1,9 @@
+v0.0.9
+- clear 7 day labels not 6
+- save only the actual location code
+
 v0.0.8
-- fix error if no internet connection is available when searching for a 
location 
+- fix error if no internet connection is available when searching for a 
location
 
 v0.0.7
 - fix: import error on Windows with non/extended-ascii profile paths
diff --git a/weather.wunderground/default.py b/weather.wunderground/default.py
index 7e872b2..5d7eae4 100644
--- a/weather.wunderground/default.py
+++ b/weather.wunderground/default.py
@@ -27,7 +27,7 @@ sys.path.append (__resource__)
 from utilities import *
 
 LOCATION_URL    = 
'http://autocomplete.wunderground.com/aq?query=%s&format=JSON'
-WEATHER_URL     = 
'http://api.wunderground.com/api/%s/conditions/forecast7day/hourly%s.json'
+WEATHER_URL     = 
'http://api.wunderground.com/api/%s/conditions/forecast7day/hourly/q/%s.json'
 GEOIP_URL       = 'http://api.wunderground.com/api/%s/geolookup/q/autoip.json'
 A_I_K           = 'NDEzNjBkMjFkZjFhMzczNg=='
 WEATHER_WINDOW  = xbmcgui.Window(12600)
@@ -81,7 +81,7 @@ def location(string):
     if query != '':
         for item in query['RESULTS']:
             location   = item['name']
-            locationid = item['l']
+            locationid = item['l'][3:]
             loc.append(location)
             locid.append(locationid)
     return loc, locid
@@ -89,7 +89,7 @@ def location(string):
 def geoip():
     data = fetch(GEOIP_URL % aik[::-1])
     if data != '' and data.has_key('location'):
-        location = data['location']['l']
+        location = data['location']['l'][3:]
         __addon__.setSetting('Location1', data['location']['city'])
         __addon__.setSetting('Location1id', location)
     else:
@@ -148,9 +148,10 @@ else:
     if location == '':
         location = geoip()
     if not location == '':
+        if location.startswith('/q/'): # backwards compatibility
+            location = location[3:]
         forecast(location)
     else:
-        # workaround to fix incrementing values on each weather refresh when 
no locations are set up:
         set_property('Current.Condition'     , 'N/A')
         set_property('Current.Temperature'   , '0')
         set_property('Current.Wind'          , '0')
@@ -161,7 +162,7 @@ else:
         set_property('Current.DewPoint'      , '0')
         set_property('Current.OutlookIcon'   , 'na.png')
         set_property('Current.FanartCode'    , 'na')
-        for count in range (0, MAXDAYS):
+        for count in range (0, MAXDAYS+1):
             set_property('Day%i.Title'       % count, 'N/A')
             set_property('Day%i.HighTemp'    % count, '0')
             set_property('Day%i.LowTemp'     % count, '0')
diff --git a/weather.wunderground/resources/language/Chinese 
(Simple)/strings.xml b/weather.wunderground/resources/language/Chinese 
(Simple)/strings.xml
index ab8b025..bf8ec85 100644
--- a/weather.wunderground/resources/language/Chinese (Simple)/strings.xml      
+++ b/weather.wunderground/resources/language/Chinese (Simple)/strings.xml      
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <strings>
        <string id="30101">所在地设置</string>
        <string id="30111">更改地点1</string>

-----------------------------------------------------------------------

Summary of changes:
 weather.wunderground/addon.xml                     |    4 ++--
 weather.wunderground/changelog.txt                 |    6 +++++-
 weather.wunderground/default.py                    |   11 ++++++-----
 .../language/Chinese (Simple)/strings.xml          |    2 +-
 4 files changed, 14 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to