The branch, eden has been updated
       via  95294e7f27f97a1620da028b32e070add5f78fe0 (commit)
      from  283294aaac84b35960578a3e04dcb79791b89717 (commit)

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

commit 95294e7f27f97a1620da028b32e070add5f78fe0
Author: ronie <[email protected]>
Date:   Sat Mar 3 16:05:56 2012 +0100

    [weather.wunderground] -v0.0.7
    
    sync with xbmc git

diff --git a/weather.wunderground/addon.xml b/weather.wunderground/addon.xml
index 2b5de05..157565a 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.5" 
provider-name="Team XBMC">
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="weather.wunderground" name="Weather Underground" version="0.0.7" 
provider-name="Team XBMC">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
@@ -8,13 +8,16 @@
        <extension point="xbmc.addon.metadata">
                <summary lang="bg">Синоптична прогноза от 
wunderground.com</summary>
                <summary lang="en">Weather forecast from 
wunderground.com</summary>
+               <summary lang="fi">Sääennusteet wunderground.com 
-sivustolta</summary>
                <summary lang="se">Väderprognos från 
wunderground.com</summary>
                <summary 
lang="zh">来自wunderground.com的天气预报</summary>
                <description lang="bg">Прогноза за времето 
осигурена от Weather Underground 
(http://www.wunderground.com/)</description>
                <description lang="en">Weather forecast provided by Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="fi">Sääennusteet Weather Underground 
-sivuston tarjoamina (http://www.wunderground.com/)</description>
                <description lang="se">Väderprognos tillhandahållen av 
Weather Underground (http://www.wunderground.com/)</description>
                <description lang="zh">由Weather 
Underground(http://www.wunderground.com/)提供的天气预报</description>
                <disclaimer lang="en">Use of this add-on implies that you have 
agreed to the Terms of Service located at 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="fi">Tämän lisäosan käyttäminen 
tarkoittaa, että olet hyväksynyt käyttöehdot, jotka sijaitsevat osoitteessa 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
                <disclaimer lang="se">Användning av detta tillägg innebär 
att du har godkänt Terms of Service från 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
                <disclaimer 
lang="zh">使用此扩展功能意味着你同意此连接下的服务条款:http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
                <platform>all</platform>
diff --git a/weather.wunderground/changelog.txt 
b/weather.wunderground/changelog.txt
index 62596ec..8640648 100644
--- a/weather.wunderground/changelog.txt
+++ b/weather.wunderground/changelog.txt
@@ -1,3 +1,10 @@
+v0.0.7
+- fix: import error on Windows with non/extended-ascii profile paths
+
+v0.0.6
+- ignore various n/a values in wu data
+- use kph value for windspeed
+
 v0.0.5
 - add geoip support
 - fetch 7 day forecast
diff --git a/weather.wunderground/default.py b/weather.wunderground/default.py
index 86d07c7..009f0f5 100644
--- a/weather.wunderground/default.py
+++ b/weather.wunderground/default.py
@@ -20,7 +20,7 @@ import xbmcgui, xbmcaddon
 __addon__      = xbmcaddon.Addon()
 __provider__   = __addon__.getAddonInfo('name')
 __cwd__        = __addon__.getAddonInfo('path')
-__resource__   = xbmc.translatePath(os.path.join(__cwd__, 'resources', 'lib'))
+__resource__   = xbmc.translatePath(os.path.join(__cwd__, 'resources', 
'lib')).decode("utf-8")
 
 sys.path.append (__resource__)
 
@@ -68,7 +68,8 @@ def fetch(url):
     except:
         json_string = ''
     try:
-        parsed_json = simplejson.loads(json_string)
+        json_clean = 
json_string.replace('"-9999.00"','""').replace('"-9998"','""').replace('"NA"','""')
+        parsed_json = simplejson.loads(json_clean)
     except:
         parsed_json = ''
     return parsed_json
@@ -103,7 +104,7 @@ def properties(query):
     weathercode = 
WEATHER_CODES[query['current_observation']['icon_url'][31:-4]]
     set_property('Current.Condition'     , 
query['current_observation']['weather'])
     set_property('Current.Temperature'   , 
str(query['current_observation']['temp_c']))
-    set_property('Current.Wind'          , 
str(int(query['current_observation']['wind_mph'] * 1.609344)))
+    set_property('Current.Wind'          , 
str(query['current_observation']['wind_kph']))
     set_property('Current.WindDirection' , 
query['current_observation']['wind_dir'])
     set_property('Current.Humidity'      , 
query['current_observation']['relative_humidity'].rstrip('%'))
     set_property('Current.FeelsLike'     , 
str((int(query['hourly_forecast'][0]['feelslike']['english'])-32)*5/9))
diff --git a/weather.wunderground/resources/language/Chinese 
(Simple)/strings.xml b/weather.wunderground/resources/language/Chinese 
(Simple)/strings.xml
index bf8ec85..ab8b025 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                     |    7 +++++--
 weather.wunderground/changelog.txt                 |    7 +++++++
 weather.wunderground/default.py                    |    7 ++++---
 .../language/Chinese (Simple)/strings.xml          |    2 +-
 .../resources/language/Dutch/strings.xml           |    7 +++++++
 5 files changed, 24 insertions(+), 6 deletions(-)
 create mode 100644 weather.wunderground/resources/language/Dutch/strings.xml


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to