The branch, eden has been updated
       via  26581ac6c36793faced282333d75e37011784408 (commit)
      from  54b79746986c0dfc951b410961d42e89d2d9bf17 (commit)

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

commit 26581ac6c36793faced282333d75e37011784408
Author: ronie <[email protected]>
Date:   Thu Jul 18 23:14:08 2013 +0200

    [weather.wunderground] -v0.9.9

diff --git a/weather.wunderground/addon.xml b/weather.wunderground/addon.xml
index 9396393..f32f3f2 100644
--- a/weather.wunderground/addon.xml
+++ b/weather.wunderground/addon.xml
@@ -1,25 +1,159 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="weather.wunderground" name="Weather Underground" version="0.0.9" 
provider-name="Team XBMC">
+<addon id="weather.wunderground" name="Weather Underground" version="0.9.9" 
provider-name="Team XBMC">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
-               <import addon="script.module.simplejson" version="2.0.10"/>
        </requires>
        <extension point="xbmc.python.weather" library="default.py"/>
        <extension point="xbmc.addon.metadata">
+               <summary lang="af">Weer voorspelling vanaf 
wunderground.com</summary>
+               <summary lang="am">የአየር ንብረት ከ 
wunderground.com</summary>
+               <summary lang="ar">توقعات الطقس من 
wunderground.com</summary>
+               <summary lang="be">Прагноз надвор'я з 
wunderground.com</summary>
                <summary lang="bg">Синоптична прогноза от 
wunderground.com</summary>
+               <summary lang="ca">Previsió del temps de 
wunderground.com</summary>
+               <summary lang="cs">Předpověď počasí z 
wunderground.com</summary>
+               <summary lang="cy">Rhagolygon tywydd gan 
wunderground.com</summary>
+               <summary lang="da">Vejrudsigt fra wunderground.com</summary>
+               <summary lang="de">Wettervorhersage von 
wunderground.com</summary>
+               <summary lang="el">Πρόγνωση καιρού από το 
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="es">Predicción meteorológica de 
wunderground.com</summary>
+               <summary lang="es_AR">Pronóstico meteorológico de 
wunderground.com</summary>
+               <summary lang="es_MX">Pronóstico de wunderground.com</summary>
+               <summary lang="et">Ilmaennustus portaalist 
wunderground.com</summary>
+               <summary lang="eu">Eguraldi iragarpena 
wunderground.com-etik</summary>
+               <summary lang="fi">Sääennusteet 
wunderground.com-sivustolta</summary>
+               <summary lang="fo">Veðurlíkindi frá 
wunderground.com</summary>
+               <summary lang="fr">Prévisions météo fournies par 
wunderground.com</summary>
+               <summary lang="gl">Predición meteorolóxica de 
wunderground.com</summary>
+               <summary lang="he">תחזית מזג האויר מאת 
wunderground.com</summary>
+               <summary lang="hr">Prognoza vremena s wunderground.com</summary>
+               <summary lang="hu">Időjárás előrejelzés a 
wunderground.com-tól</summary>
+               <summary lang="is">Veðurspár frá wunderground.com</summary>
+               <summary lang="it">Meteo fornito da wunderground.com</summary>
+               <summary lang="ja">wunderground.com 天気予報</summary>
+               <summary lang="ko">wunderground.com 날씨예보</summary>
+               <summary lang="lt">Orų prognozė nuo/iš 
wunderground.com</summary>
+               <summary lang="mk">Временска прогноза од 
wunderground.com</summary>
+               <summary lang="my">wunderground.com မှ 
ရာသီဥတုခန့်မှန်းချက်</summary>
+               <summary lang="nl">Weersvoorspelling van 
wunderground.com</summary>
+               <summary lang="no">Værvarsel fra wunderground.com</summary>
+               <summary lang="pl">Prognoza pogody ze strony 
wunderground.com</summary>
+               <summary lang="pt">Previsão meteorológica a partir de 
wunderground.com</summary>
+               <summary lang="pt_BR">Previsão do tempo por 
wunderground.com</summary>
+               <summary lang="ro">Starea vremii de la 
wunderground.com</summary>
+               <summary lang="ru">Прогноз погоды с сайта 
wunderground.com</summary>
+               <summary lang="sk">Predpoveď počasia z 
wunderground.com</summary>
+               <summary lang="sl">Vremenska napoved, ki jo zagotavlja 
wunderground.com</summary>
+               <summary lang="sq">Parashikimi i motit nga 
wunderground.com</summary>
+               <summary lang="sv">Väderprognos från 
wunderground.com</summary>
+               <summary lang="ta_IN">Wunderground.com இருந்து 
வானிலை முன்னறிவிப்பு</summary>
+               <summary 
lang="th">พยากรณ์อากาศจาก 
wunderground.com</summary>
+               <summary lang="tr">Hava durumu wunderground.com sitesinden 
alınır</summary>
+               <summary lang="uk">Прогноз погоди з 
wunderground.com</summary>
+               <summary lang="uz">wunderground.com dan ob-havo 
ma'lumoti</summary>
+               <summary lang="vi">Dự báo thời tiết từ 
wunderground.com</summary>
                <summary 
lang="zh">来自wunderground.com的天气预报</summary>
-               <description lang="bg">Прогноза за времето 
осигурена от Weather Underground 
(http://www.wunderground.com/)</description>
+               <summary lang="zh_TW">weatherground.com 上的天氣預å 
±</summary>
+               <description lang="af">Weer voorspelling verskaf deur Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="am">የአየር ንብረት የሚቀርበ
ው በ Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="ar">توقعات الطقس من تقديم 
Weather Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="be">Прагноз надвор'я 
створаны Weather Underground 
(http://www.wunderground.com/)</description>
+               <description lang="bg">Синоптична прогноза с 
данните от Weather Underground 
(http://www.wunderground.com/)</description>
+               <description lang="ca">Previsió del temps proporcionada per 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="cs">Předpověď počasí poskytnuta 
stránkou Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="cy">Rhagolygon tywydd gan Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="da">Vejrudsigten leveres af Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="de">Wettervorhersage bereitgestellt durch 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="el">Η πρόγνωση καιρού 
παρέχεται από το Weather Underground 
(http://www.wunderground.com/)</description>
                <description lang="en">Weather forecast provided by Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="es">Predicción meteorológica proporcionada 
por Weather Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="es_AR">Pronóstico meteorológico 
proporcionado por Weather 
Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="es_MX">Pronóstico del tiempo por Weather 
Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="et">Ilma ennustab 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="fo">Veðurlíkindi eru veitt av Weather 
Underground (http://www.wunderground.com)</description>
+               <description lang="fr">Prévisions météo fournies par Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="gl">Predición meteorolóxica provista por 
Weather Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="he">תחזית מזג האויר ניתנת 
ע"י Weather Underground (http://www.wunderground.com</description>
+               <description lang="hr">Prognozu vremena omogućava Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="hu">Az előrejelzést a Weather Underground 
(http://www.wunderground.com/) szolgáltatja </description>
+               <description lang="is">Veðurspár frá Weather Underground 
(http://www.wunderground.com/)</description>
+               <description lang="it">Meteo fornito da Weather Underground 
(http://www.wunderground.com/)</description>
+               <description lang="ja">Weather Underground 
(http://www.wunderground.com/) 提供の天気予報</description>
+               <description lang="ko">Weather Underground 
(http://www.wunderground.com/)가 제공하는 날씨예보</description>
+               <description lang="lt">Orų prognozė teikiama (pateikiama) iš 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="mk">Временска прогноза 
обезбедена од Weather Underground 
(http://www.wunderground.com/)</description>
+               <description 
lang="my">ရာသီဥတုခန့်မှန်းချက်ကို 
Weather Underground (http://www.wunderground.com/) 
မှထောက်ပံ့ပေးထားပါသည်။</description>
+               <description lang="nl">Weersvoorspelling voorzien door Weather 
Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="no">Værvarsel fra Weather Underground 
(http://www.wunderground.com)</description>
+               <description lang="pl">Prognoza pogody jest dostarczona dzięki 
uprzejmości serwisu: (http://www.wunderground.com/)</description>
+               <description lang="pt">Previsão meteorológica fornecida por 
Weather Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="pt_BR">Previsão do tempo por Weather 
Underground (http://www.wunderground.com/)</description>
+               <description lang="ro">Starea vremii furnizată de Weather 
Underground &#10;(http://www.wunderground.com/)</description>
+               <description lang="ru">Прогноз погоды 
предоставлен компанией Weather Underground 
(http://www.wunderground.com/)</description>
+               <description lang="sk">Predpoveď počasia poskytovaná od 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="sl">Vremenska napoved, ki jo zagotavlja 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="sq">Parashikimi i motit i pajisur nga 
Weahter Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="sv">Väderprognos tillhandahållen av 
Weather Underground&#10;(http://www.wunderground.com/)</description>
+               <description lang="ta_IN">வானிலை 
முன்னறிவிப்பு வழங்குபவர் 
வானிலை அண்டர்கிரவுண்டு 
(http://www.wunderground.com/)</description>
+               <description 
lang="th">พยากรณ์อากาศโดย Weather Underground 
&#10;(http://www.wunderground.com/)</description>
+               <description lang="tr">Hava Durumu Weather Underground 
tarafından sağlanır (http://www.wunderground.com/)</description>
+               <description lang="uk">Прогноз погоди надано 
Weather Underground (http://www.wunderground.com/)</description>
+               <description lang="uz">Ob-havo ma'lumoti Weather Underground 
(http://www.wunderground.com/) tomonidan taqdim etilgan</description>
+               <description lang="vi">Dự báo thời tiết từ Weather 
Underground (http://www.wunderground.com/)</description>
                <description lang="zh">由Weather 
Underground(http://www.wunderground.com/)提供的天气预报</description>
+               <description lang="zh_TW">天氣預報由 Weather Underground 
(http://www.wunderground.com/) 所提供</description>
+               <disclaimer lang="af">Die gebruik van hierdie byvoegsel 
impliseer dat U saamstem met die Terme van Diens uiteengesit op 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="ar">استعمالك لهذه الإضافة 
يعني انك وافقت على شروط الإستخدام الموجودة 
على الرابط 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="be">Выкарыстаньне гэтага 
дадатку пацьвярджае што вы згаджаецеся з 
Умовамі Выкарыстаньня што знаходзяцца на 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="bg">Употребявайки 
добавката Вие се съгласявате с условията 
за ползване на услугата, които се намират 
на http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="ca">L'ús d'aquest complement implica que 
vostè ha acceptat els termes de servei ubicats a 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="cs">Používáním tohoto rozšíření 
schvalujete podmínky užívání umístěné na 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="cy">Mae defnyddio'r ategyn yma'n awgrymu eich 
bod yn cytuno i'r Amodau Gwasanaeth sydd yn 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="da">Brug af denne addon indebærer, at du har 
erklæret dig enig i vilkårene for tjenesten, der findes på 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="de">Mit Benutzung dieses Addons bestätigen 
Sie, dass Sie den Nutzungsbedingungen auf 
http://www.wunderground.com/weather/api/d/terms.html zustimmen.</disclaimer>
+               <disclaimer lang="el">Χρήση αυτού του 
πρόσθετου συνεπάγεται την αποδοχή των Όρων 
Χρήσης της Υπηρεσίας (Terms of Service) οι οποίοι 
βρίσκονται στο 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
                <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="es">Al usar este complemento, aceptas los 
términos de uso de 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="es_AR">Al usar este complemento, aceptas los 
términos de uso de 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="es_MX">El uso de este add-on implica que 
usted esta de acuerdo con los Términos de Servicio localizados en 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="et">Selle lisamooduli kasutamine viitab 
sellele, et te olete nõustunud kasutajatingimustega aadressil 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="eu">Gehigarri hau erabiltzeak 
http://www.wunderground.com/weather/api/d/terms.html -en aurkitzen diren 
zerbitzu baldintzak onartzen inplikatzen du.</disclaimer>
+               <disclaimer lang="fi">Tämän lisäosan käyttäminen 
tarkoittaa, että olet hyväksynyt osoitteessa 
http://www.wunderground.com/weather/api/d/terms.html sijaitsevat 
käyttöehdot</disclaimer>
+               <disclaimer lang="fo">Nýtsla av hesi víðkan merkir at tú 
góðtekur treytirnar sum finnast á 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="fr">L'utilisation de cette extension implique 
votre acceptation des Conditions Générales d'Utilisation disponibles sur 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="gl">Empregar este Engadido implica que 
vostede aceptou os termos de servizo localizados en 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="he">שימוש בתוסף זה משתמע 
שאישרת את תנאי השימוש אשר ממוקמים בכתובת 
הבאה http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="hr">Upotreba ovog dodatka podrazumijeva da se 
slažete s Pravilima korištenja koja se nalaze na 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="hu">A kiegészítő használatával elfogadod 
a következő feltételeket: 
http://www.wunderground.com/weather/api/d/terms.html&#10;&#10;    </disclaimer>
+               <disclaimer lang="is">Notkun á þessari viðbót gefur til 
kynna að þú hafir samþykkt skilmálana sem finna má á 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="it">Usando questo add-on accetti i Termini di 
Servizio consultabili su 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer 
lang="ja">このアドオンを使うと、http://www.wunderground.com/weather/api/d/terms.html
 にある規約に合意したものと見なされます</disclaimer>
+               <disclaimer lang="ko">이 애드온을 사용하는 것은 
http://www.wunderground.com/weather/api/d/terms.html 에 있는 서비스 
약관에 동의함을 의미합니다</disclaimer>
+               <disclaimer lang="lt">Naudodami šį priedą jūs 
sutinate(-kote) su paslaugų teikimo sąlygomis esančiomis 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="mk">Користење на овој 
додаток имплицира дека се согласувате со 
условите за користење кои се наоѓаат на 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="my">ဒီ add-on 
ကိုသုံးခြင်းသည် 
http://www.wunderground.com/weather/api/d/terms.html 
တွင်ရှိသော Terms of Service 
ကိုသဘောတူညီဟု 
သတ်မှတ်သည်</disclaimer>
+               <disclaimer lang="nl">Het gebruik van deze add-on impliceert 
dat je akkoord gaat met de service-voorwaarden op 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="no">Bruken av dette tillegget betinger at du 
har godkjent brukervilkårene på 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="pl">Korzystanie z tego dodatku jest 
równoważne z akceptacją regulaminu dostępnego pod adresem: 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="pt">O uso deste Add-on implica o seu acordo 
com os Termos do Serviço. Pode encontrá-los em 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="pt_BR">Usar este add-on implica que você 
concorda com os termos de uso localizados em 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="ro">Folosirea acestui plugin implică 
acceptarea Termenilor și Serviciilor aflate la adresa 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="ru">Используя это 
дополнение, вы соглашаетесь с условиями 
предоставления услуг, доступными по адресу 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="sk">Používaním tohto doplnku súhlasíte s 
podmienkami používania služby umiestnenými na 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="sl">Z uporabo vtičnika se strinjate s Pogoji 
uporabe, ki se nahajajo na 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="sq">Përdorimi i kësaj shtesës nënkupton 
që ke lexuar Termat e Shërbimit të lokalizuar tek 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="sv">Användning av detta tillägg innebär 
att ni har accepterat användarvillkoren som går att hitta 
på&#10;http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="ta_IN">விதிமுறைகள் 
ஒப்பு கொண்டீர் என்று 
தெரிகிறது 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer 
lang="th">ในการใช้บริการโปรแกรมเสริมนี้หมายความว่าคุณได้ยอมรับเงื่อนไขในการให้บริการโดย
 http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="tr">Bu eklentinin kullanımı aynı zamanda 
http://www.wunderground.com/weather/api/d/terms.html adresindeki Kullanım 
koşullarını da kabul ettiğiniz anlamına gelir.</disclaimer>
+               <disclaimer lang="uk">Скориставшись цією 
надбудовою, ви тим самим погоджуєтеся з 
умовами використання: 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="vi">Khi sử dụng add-on này đồng 
nghĩa với việc bạn đồng ý với các điều khoản sử dụng 
dịch vụ của nhà cung cấp tại địa chỉ 
http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
                <disclaimer lang="zh">使用此扩展功能意味着你
同意此连接下的服务条款:http://www.wunderground.com/weather/api/d/terms.html</disclaimer>
+               <disclaimer lang="zh_TW">使用這個附加元件代表你
同意 http://www.wunderground.com/weather/api/d/terms.html 所載之使用者
條款</disclaimer>
+               <language></language>
                <platform>all</platform>
+               <broken>XBMC Eden is no longer supported... sorry!</broken>
        </extension>
 </addon>
diff --git a/weather.wunderground/changelog.txt 
b/weather.wunderground/changelog.txt
index f9c0fe0..3ecd4b0 100644
--- a/weather.wunderground/changelog.txt
+++ b/weather.wunderground/changelog.txt
@@ -1,9 +1,72 @@
+v0.9.9
+- XBMC Eden is no longer supported... sorry!
+
+v0.1.12
+- updated wunderground api module
+
+v0.1.11
+- added spanish translation
+- avoid crashes on api error responses
+- fix invalid humidity value
+
+v0.1.10
+- add 'L' weather alert severity
+- filter invalid response code
+- don't add beaufort unit to windspeeds
+- fix default zoom level
+- fixed windspeed for uk based locations in 36 hour and weekend forecast
+- localize AM/PM strings
+- made animated maps optional
+
+v0.1.9
+- fixed json error when no files are found
+- fix 36 hour heading and temp (again)
+- better detection of systems that use AM/PM time format
+- provide windspeeds in beaufort for systems that use it
+
+v0.1.8
+- fixed escape slashes in path
+
+v0.1.7
+- clear alert properties when there are no alerts
+- delete chached images when weather location is changed
+
+v0.1.6
+- fix 36 hour heading and temp for certain languages
+- provide 3 day weekend forecast
+- keep 4 hours worth of satellite images to create an animation
+
+v0.1.5
+- fixed weather icon location
+- fixed temp unit for hourly feels like
+
+v0.1.4
+- fetch satellite image instead of radar
+
+v0.1.3
+- disabled yesterdays weather and animated radar images (we don't have free 
access to that data)
+- added static radar image
+
+v0.1.2
+- bug fixes
+
+v0.1.1
+- beta release
+
+v0.1.0
+- wait for thread to finish before setting properties
+
 v0.0.9
-- clear 7 day labels not 6
-- save only the actual location code
+- implement threading
+- added wundermap support
 
 v0.0.8
-- fix error if no internet connection is available when searching for a 
location
+- use ascii strings for location search
+- added advanced configuration
+- added debug logging
+- added Current.Location window property
+- moved api code to a separate module (other weather addons can use it fetch 
wunderground data)
+- localize weather data
 
 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 5d7eae4..5520cdd 100644
--- a/weather.wunderground/default.py
+++ b/weather.wunderground/default.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 # *  This Program is free software; you can redistribute it and/or modify
 # *  it under the terms of the GNU General Public License as published by
 # *  the Free Software Foundation; either version 2, or (at your option)
@@ -12,163 +14,57 @@
 # *  along with XBMC; see the file COPYING. If not, write to
 # *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 # *  http://www.gnu.org/copyleft/gpl.html
-# *
 
-import os, sys, urllib2, base64, socket, simplejson
-import xbmcgui, xbmcaddon
-
-__addon__      = xbmcaddon.Addon()
-__provider__   = __addon__.getAddonInfo('name')
-__cwd__        = __addon__.getAddonInfo('path')
-__resource__   = xbmc.translatePath(os.path.join(__cwd__, 'resources', 
'lib')).decode("utf-8")
 
-sys.path.append (__resource__)
+import sys
+import xbmc, xbmcgui, xbmcaddon
 
-from utilities import *
+__addon__      = xbmcaddon.Addon()
+__addonname__  = __addon__.getAddonInfo('name')
+__addonid__    = __addon__.getAddonInfo('id')
+__version__    = __addon__.getAddonInfo('version')
 
-LOCATION_URL    = 
'http://autocomplete.wunderground.com/aq?query=%s&format=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)
-MAXDAYS         = 6
+DEBUG            = 'true'
+WEATHER_WINDOW   = xbmcgui.Window(12600)
+MAXDAYS          = 6
 
-socket.setdefaulttimeout(10)
+def log(txt):
+    if DEBUG == 'true':
+        if isinstance (txt,str):
+            txt = txt.decode("utf-8")
+        message = u'%s: %s' % (__addonid__, txt)
+        xbmc.log(msg=message.encode("utf-8"), level=xbmc.LOGINFO)
 
 def set_property(name, value):
     WEATHER_WINDOW.setProperty(name, value)
 
 def refresh_locations():
-    location_set1 = __addon__.getSetting('Location1')
-    location_set2 = __addon__.getSetting('Location2')
-    location_set3 = __addon__.getSetting('Location3')
-    locations = 0
-    if location_set1 != '':
-        locations += 1
-        set_property('Location1', location_set1)
-    else:
-        set_property('Location1', '')
-    if location_set2 != '':
-        locations += 1 
-        set_property('Location2', location_set2)
-    else:
-        set_property('Location2', '')
-    if location_set3 != '':
-        locations += 1
-        set_property('Location3', location_set3)
-    else:
-        set_property('Location3', '')
-    set_property('Locations', str(locations))
-
-def fetch(url):
-    try:
-        req = urllib2.urlopen(url)
-        json_string = req.read()
-        req.close()
-    except:
-        json_string = ''
-    try:
-        json_clean = 
json_string.replace('"-9999.00"','""').replace('"-9998"','""').replace('"NA"','""')
-        parsed_json = simplejson.loads(json_clean)
-    except:
-        parsed_json = ''
-    return parsed_json
-
-def location(string):
-    loc   = []
-    locid = []
-    query = fetch(LOCATION_URL % (urllib2.quote(string)))
-    if query != '':
-        for item in query['RESULTS']:
-            location   = item['name']
-            locationid = item['l'][3:]
-            loc.append(location)
-            locid.append(locationid)
-    return loc, locid
-
-def geoip():
-    data = fetch(GEOIP_URL % aik[::-1])
-    if data != '' and data.has_key('location'):
-        location = data['location']['l'][3:]
-        __addon__.setSetting('Location1', data['location']['city'])
-        __addon__.setSetting('Location1id', location)
-    else:
-        location = ''
-    return location
-
-def forecast(city):
-    data = fetch(WEATHER_URL % (aik[::-1], city))
-    if data != '':
-        properties(data)
-
-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(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))
-    set_property('Current.UVIndex'       , query['hourly_forecast'][0]['uvi'])
-    set_property('Current.DewPoint'      , 
str(query['current_observation']['dewpoint_c']))
-    set_property('Current.OutlookIcon'   , '%s.png' % weathercode)
-    set_property('Current.FanartCode'    , weathercode)
-    for count, item in 
enumerate(query['forecast']['simpleforecast']['forecastday']):
-        weathercode = WEATHER_CODES[item['icon_url'][31:-4]]
-        day = DAYS[item['date']['weekday_short']]
-        set_property('Day%i.Title'       % count, day)
-        set_property('Day%i.HighTemp'    % count, str(item['high']['celsius']))
-        set_property('Day%i.LowTemp'     % count, str(item['low']['celsius']))
-        set_property('Day%i.Outlook'     % count, item['conditions'])
-        set_property('Day%i.OutlookIcon' % count, '%s.png' % weathercode)
-        set_property('Day%i.FanartCode'  % count, weathercode)
-        if count == MAXDAYS:
-            break
-
-if sys.argv[1].startswith('Location'):
-    keyboard = xbmc.Keyboard('', xbmc.getLocalizedString(14024), False)
-    keyboard.doModal()
-    if (keyboard.isConfirmed() and keyboard.getText() != ''):
-        text = keyboard.getText()
-        locations, locationids = location(text)
-        dialog = xbmcgui.Dialog()
-        if locations != []:
-            selected = dialog.select(xbmc.getLocalizedString(396), locations)
-            if selected != -1: 
-                __addon__.setSetting(sys.argv[1], locations[selected])
-                __addon__.setSetting(sys.argv[1] + 'id', locationids[selected])
-        else:
-            dialog.ok(__provider__, xbmc.getLocalizedString(284))
-
-else:
-    location = __addon__.getSetting('Location%sid' % sys.argv[1])
-    aik = base64.b64decode(A_I_K)
-    if (location == '') and (sys.argv[1] != '1'):
-        location = __addon__.getSetting('Location1id')
-    if location == '':
-        location = geoip()
-    if not location == '':
-        if location.startswith('/q/'): # backwards compatibility
-            location = location[3:]
-        forecast(location)
-    else:
-        set_property('Current.Condition'     , 'N/A')
-        set_property('Current.Temperature'   , '0')
-        set_property('Current.Wind'          , '0')
-        set_property('Current.WindDirection' , 'N/A')
-        set_property('Current.Humidity'      , '0')
-        set_property('Current.FeelsLike'     , '0')
-        set_property('Current.UVIndex'       , '0')
-        set_property('Current.DewPoint'      , '0')
-        set_property('Current.OutlookIcon'   , 'na.png')
-        set_property('Current.FanartCode'    , 'na')
-        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')
-            set_property('Day%i.Outlook'     % count, 'N/A')
-            set_property('Day%i.OutlookIcon' % count, 'na.png')
-            set_property('Day%i.FanartCode'  % count, 'na')
-
+    for count in range(1, 4):
+        set_property('Location%s' % count, '')
+    set_property('Locations', '0')
+
+def clear():
+    set_property('Current.Condition'     , 'N/A')
+    set_property('Current.Temperature'   , '0')
+    set_property('Current.Wind'          , '0')
+    set_property('Current.WindDirection' , 'N/A')
+    set_property('Current.Humidity'      , '0')
+    set_property('Current.FeelsLike'     , '0')
+    set_property('Current.UVIndex'       , '0')
+    set_property('Current.DewPoint'      , '0')
+    set_property('Current.OutlookIcon'   , 'na.png')
+    set_property('Current.FanartCode'    , 'na')
+    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')
+        set_property('Day%i.Outlook'     % count, 'N/A')
+        set_property('Day%i.OutlookIcon' % count, 'na.png')
+        set_property('Day%i.FanartCode'  % count, 'na')
+
+log('version %s started: %s' % (__version__, sys.argv))
+log('XBMC Eden is no longer supported... sorry!')
+clear()
 refresh_locations()
-set_property('WeatherProvider', 'Weather Underground')
+set_property('WeatherProvider', __addonname__)
+log('finished')

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

Summary of changes:
 weather.wunderground/addon.xml                     |  150 ++++++++++++++-
 weather.wunderground/changelog.txt                 |   69 +++++++-
 weather.wunderground/default.py                    |  194 +++++---------------
 .../language/Chinese (Simple)/strings.xml          |    7 -
 .../resources/language/Dutch/strings.xml           |    7 -
 .../resources/language/English/strings.xml         |    7 -
 .../resources/language/Finnish/strings.xml         |    7 -
 .../resources/language/German/strings.xml          |    7 -
 .../resources/language/Swedish/strings.xml         |   12 --
 weather.wunderground/resources/lib/utilities.py    |   51 -----
 weather.wunderground/resources/settings.xml        |   11 -
 11 files changed, 253 insertions(+), 269 deletions(-)
 delete mode 100644 weather.wunderground/resources/language/Chinese 
(Simple)/strings.xml
 delete mode 100644 weather.wunderground/resources/language/Dutch/strings.xml
 delete mode 100644 weather.wunderground/resources/language/English/strings.xml
 delete mode 100644 weather.wunderground/resources/language/Finnish/strings.xml
 delete mode 100644 weather.wunderground/resources/language/German/strings.xml
 delete mode 100644 weather.wunderground/resources/language/Swedish/strings.xml
 delete mode 100644 weather.wunderground/resources/lib/utilities.py
 delete mode 100644 weather.wunderground/resources/settings.xml


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to