The branch, eden-pre has been updated
       via  37f417801a7c033920323b93285367cd552ad586 (commit)
       via  5c38eaa971f6985025479e5e726430109e3aec7d (commit)
      from  69c91dc5ce25969970ef3d3c7392f80082472f97 (commit)

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

commit 37f417801a7c033920323b93285367cd552ad586
Author: amet <[email protected]>
Date:   Fri Nov 18 01:23:37 2011 +0400

    [script.xbmc.subtitles] -v 2.9.27
    
    2.9.27
    - fixed searching for some tvshows in Titulky.com service, thx Libor
    
    2.9.26
    - Added ability to choose subtitles type for Napisy24.pl & Napisy.me, thx 
mrto
    - fixed: Turkish translation, thx queeup

diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index fbe409a..60e7df2 100644
--- a/script.xbmc.subtitles/addon.xml
+++ b/script.xbmc.subtitles/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.xbmc.subtitles"
        name="XBMC Subtitles"
-       version="2.9.25"
+       version="2.9.27"
        provider-name="Amet, mr_blobby">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/script.xbmc.subtitles/changelog.txt 
b/script.xbmc.subtitles/changelog.txt
index 5d62a8d..53aad36 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,10 @@
+2.9.27
+- fixed searching for some tvshows in Titulky.com service, thx Libor
+
+2.9.26
+- Added ability to choose subtitles type for Napisy24.pl & Napisy.me, thx mrto
+- fixed: Turkish translation, thx queeup
+
 2.9.25
 - fixed: typo in Napisy24pl
 
diff --git a/script.xbmc.subtitles/resources/language/English/strings.xml 
b/script.xbmc.subtitles/resources/language/English/strings.xml
index 3520272..308ffda 100644
--- a/script.xbmc.subtitles/resources/language/English/strings.xml
+++ b/script.xbmc.subtitles/resources/language/English/strings.xml
@@ -68,7 +68,12 @@
     <string id="30137">- OmniSubs Password</string>
     <string id="30138">- LegendasZone Username</string>
     <string id="30139">- LegendasZone Password</string>
-  
+    <string id="30140">- Choose subs type:</string>
+    <string id="30141">SubRip</string>
+    <string id="30142">TMPlayer</string>
+    <string id="30143">MicroDVD</string>
+    <string id="30144">MPl2</string>
+    
   <!-- Languages  -->
   
     <string id="30201">Albanian</string>
diff --git a/script.xbmc.subtitles/resources/language/Polish/strings.xml 
b/script.xbmc.subtitles/resources/language/Polish/strings.xml
index e7e76ef..cc437d2 100644
--- a/script.xbmc.subtitles/resources/language/Polish/strings.xml
+++ b/script.xbmc.subtitles/resources/language/Polish/strings.xml
@@ -65,6 +65,7 @@
     <string id="30137">- OmniSubs hasło</string>
     <string id="30138">- LegendasZone nazwa użytkownika</string>
     <string id="30139">- LegendasZone hasło</string>
+    <string id="30140">- Wybierz rodzaj napisów:</string>
 
   <!-- Languages  -->    
        
diff --git a/script.xbmc.subtitles/resources/language/Turkish/strings.xml 
b/script.xbmc.subtitles/resources/language/Turkish/strings.xml
index 0bb5aad..d4d6bc2 100644
--- a/script.xbmc.subtitles/resources/language/Turkish/strings.xml
+++ b/script.xbmc.subtitles/resources/language/Turkish/strings.xml
@@ -4,15 +4,15 @@
     <!-- Türkçe -->
 
     <string id="610">Ara </string>
-    <string id="612">Elle arama dizisi düzenleme</string>
+    <string id="612">El ile arama dizesi gir</string>
     <string id="642">%s Altyazı aranıyor</string>
     <string id="646">Bağlanıyor...</string>
     <string id="649">Altyazılar indiriliyor...</string>
-    <string id="652">Alt yazı dosyası indirildi ve açıldı</string>
+    <string id="652">Altyazı dosyası indirildi ve açıldı</string>
     <string id="653">Bağlantı hatası</string>
     <string id="654">Altyazı açma hatası</string>
     <string id="655">Yerel altyazı mevcut</string>
-    <string id="656">Servis zaman aşımı süresi içinde yanıt 
vermedi</string>
+    <string id="656">Hizmet zaman aşımı süresi içinde yanıt 
vermedi</string>
     <string id="657">Altyazı Bulunamadı!</string>
     <string id="744">için altyazılar bulundu</string>
     <string id="747">Üst Klasörleri Kullanarak Ara</string>
@@ -24,26 +24,29 @@
     <string id="757">Sunucu resim kodunun tekrar girilmesini 
gerektiriyor</string>
     <string id="758">Lütfen bildirim alanına bakın</string> 
     <string id="759">Bildirim alanıdaki resim kodunu girin</string>
-    <string id="760">Mevcut Servisler</string>        
+    <string id="760">Mevcut Hizmetler</string>        
     <string id="761">Bu altyazıları indirebilmek için giriş 
yapmalısınız,[CR]eklenti yapılandırmasında ayarlarınızı 
doğrulayın</string>
     <string id="762">Eklenti Ayarları</string>
     <string id="763">Otomatik olarak ilk 'sync' altyazıyı indir</string>
+    <string id="764">İlk 'sync' altyazı karşıdan yükleniyor</string>
+    <string id="765">ilk 'sync' altyazı karşıdan yüklendi</string>
+    <string id="766">Altyazı Klasörü Seç</string>
 
   <!-- Script Settings -->
 
-    <string id="30100">Dilleri Seçiniz</string>
-    <string id="30101">Tercih Edilen Dil</string>
+    <string id="30100">Diller</string>
+    <string id="30101">Birincil Dil</string>
     <string id="30102">İkincil Dil</string>
-    <string id="30103">Servisleri Seçiniz</string>
+    <string id="30103">Hizmetler</string>
     <string id="30104">- Podnapisi.net Kullanıcı Adı</string>
     <string id="30105">- Podnapisi.net Parola</string>
     <string id="30106">Gelişmiş Seçenekler</string>
     <string id="30107">Altyazıyı Film Klasörüne İndir</string>
     <string id="30108">- Özel Altyazı İndirme Yolunu Ayarla</string>
-    <string id="30110">Elle Arama Dizisi Girme</string>
+    <string id="30110">El İle Arama Dizesi Gir</string>
     <string id="30111">Üçüncü Dil</string>  
-    <string id="30113">Varsayılan Film Servisini Seç</string>
-    <string id="30114">Varsayılan Dizi Servisini Seç</string>
+    <string id="30113">Varsayılan Film Hizmetini Seç</string>
+    <string id="30114">Varsayılan Dizi Hizmetini Seç</string>
     <string id="30118">Sonuç sayfasında dosya adını göster</string>
     <string id="30119">Üst Klasörleri Kullanarak Ara</string>
     <string id="30121">Dil Kodunu Dosya Adına Ekle </string>
@@ -55,7 +58,7 @@
     <string id="30127">- Itasa Parola</string>
     <string id="30128">- Titulky Kullanıcı Adı</string>
     <string id="30129">- Titulky Parola</string>
-    <string id="30130">Eğer sonuç bulunamazsa mevcut olan sonraki serviste 
ara</string>
+    <string id="30130">Eğer sonuç bulunamazsa mevcut olan sonraki hizmette 
ara</string>
     <string id="30131">Otomatik olarak ilk 'sync' altyazıyı indir</string>
     <string id="30132">- LegendasDivx Kullanıcı Adı</string>
     <string id="30133">- LegendasDivx Parola</string>
diff --git a/script.xbmc.subtitles/resources/lib/services/Napisy24pl/service.py 
b/script.xbmc.subtitles/resources/lib/services/Napisy24pl/service.py
index da7f0e4..59c1fde 100644
--- a/script.xbmc.subtitles/resources/lib/services/Napisy24pl/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Napisy24pl/service.py
@@ -10,9 +10,20 @@ import urllib2, re, string, xbmc, sys, os
 from utilities import log, languageTranslate
 
 _ = sys.modules[ "__main__" ].__language__
+__addon__ = sys.modules[ "__main__" ].__addon__
+
+if __addon__.getSetting( "Napisy24_type" ) == "0":
+    subtitle_type = "sr"
+elif __addon__.getSetting( "Napisy24_type" ) == "1":
+    subtitle_type = "tmp"
+elif __addon__.getSetting( "Napisy24_type" ) == "2":
+    subtitle_type = "mdvd"
+elif __addon__.getSetting( "Napisy24_type" ) == "3":
+    subtitle_type = "mpl2"
 
 main_url = "http://napisy24.pl/search.php?str=";
-down_url = "http://napisy.me/download/mdvd/";
+base_download_url = "http://napisy.me/download/";
+down_url = "%s%s/" % (base_download_url, subtitle_type)
 
 subtitle_pattern = 'a href=\"/download/(\d+)/\"><strong>(.+?)</strong></a>'
 
diff --git a/script.xbmc.subtitles/resources/lib/services/Napisyme/service.py 
b/script.xbmc.subtitles/resources/lib/services/Napisyme/service.py
index 524b551..326bff1 100644
--- a/script.xbmc.subtitles/resources/lib/services/Napisyme/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Napisyme/service.py
@@ -10,9 +10,20 @@ import urllib2, re, string, xbmc, sys, os
 from utilities import log, languageTranslate
 
 _ = sys.modules[ "__main__" ].__language__
+__addon__ = sys.modules[ "__main__" ].__addon__
+
+if __addon__.getSetting( "Napisyme_type" ) == "0":
+    subtitle_type = "sr"
+elif __addon__.getSetting( "Napisyme_type" ) == "1":
+    subtitle_type = "tmp"
+elif __addon__.getSetting( "Napisyme_type" ) == "2":
+    subtitle_type = "mdvd"
+elif __addon__.getSetting( "Napisyme_type" ) == "3":
+    subtitle_type = "mpl2"
 
 main_url = "http://napisy.me/search.php?str=";
-down_url = "http://napisy.me/download/sr/";
+base_download_url = "http://napisy.me/download/";
+down_url = "%s%s/" % (base_download_url, subtitle_type)
 
 subtitle_pattern = 'alt="(.+?)" border="0" />[\r\n\t ]+?</div>[\r\n\t ]+?<div 
class="title">[\r\n\t ]+?<a href="javascript:void\(0\);" 
onclick="javascript:pobierzNapis\(\'(.+?)\'\);" title="Wydanie: (.+?)" 
class="vtip">[ \r\n]*?                                (.+?)[ \r\n]*?</a>'
 
diff --git a/script.xbmc.subtitles/resources/lib/services/Titulky/service.py 
b/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
index aa18b6e..053e221 100644
--- a/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Titulky/service.py
@@ -16,36 +16,6 @@ __scriptname__ = sys.modules[ "__main__" ].__scriptname__
 __cwd__        = sys.modules[ "__main__" ].__cwd__
 __addon__      = sys.modules[ "__main__" ].__addon__
 
-"""
-<tr class="r1"> 
-                    <td><a href="Animal-Farm-96061.htm" >Animal Farm</a></td> 
-          <td align="center"><a class="fixedTip" 
title="Animal.Farm.1954.DVDRip.XViD.iNT-JoLLyRoGeR"><img 
src="css/new/verze-release.png" atl="release"/></a></td>        
-          <td>&nbsp;</td> 
-          <td>1954</td> 
-                    <td>15.2.2008</td>        
-          <td align="right">2415</td> 
-          <td><img alt="CZ" src="css/new/flag-CZ-small.gif" /></td> 
-          <td>1</td> 
-          <td align="right">699.16MB</td> 
-                    <td> 
-                           <a href="javascript:void(0)" 
onclick="UD('126284');return false;" > DaftXK</a> 
-                      </td> 
-        </tr>
-
-
-"""
-
-subtitle_pattern='<tr class=\"r[12]*\">\s+<td[^>]*><a 
href=\"[\w-]+-(?P<id>\d+).htm\"[ 
]?>(?P<title>[^<]+)</a></td>\s+?<td[^>]*>(<a?[= 
\w\"]+title=\"(?P<sync>[^\"]+)\"><img[^>]+></a>)?</td>\s+?<td[^>]*>(?P<tvshow>[^<]+)</td>\s+<td[^>]*>(?P<year>\d+)</td>\s+<td[^<]+</td>\s+<td[^>]*>(?P<downloads>\d+)</td>\s+<td?[^>]*><img
 
alt=\"(?P<lang>\w{2})\"[^\>]+></td>\s+<td>(?P<cds>\w+)</td>\s+<td[^>]+>(?P<size>[\w\.]+)MB</td>\s+<td>\s+(<a[^<]+</a>)?(<i[^<]+</i>)?\s+</td>\s+</tr>'
-
-control_image_pattern='(secode.php\?[\w\d=]+)'
-session_id_pattern='secode.php\?PHPSESSID=([\w\d]+)'
-countdown_pattern='CountDown\((\d+)\)'
-
-"""
-<a rel="nofollow" id="downlink" 
href="/idown.php?id=48504441">www.titulky.com/idown.php?id=48504441</a>
-"""
-
-sublink_pattern='<a?[= \w\"]+href="([^\"]+)\"'
 def search_subtitles( file_original_path, title, tvshow, year, season, 
episode, set_temp, rar, lang1, lang2, lang3, stack ): #standard input
        # need to filter titles like <Localized movie name> (<Movie name>)
        br_index = title.find('(')
@@ -163,6 +133,7 @@ class TitulkyClient(object):
                        response = urllib2.urlopen(request).read()
                        log(__name__,'Got response')
                        return not response.find('BadLogin')>-1
+
        def search_subtitles(self, file_original_path, title, tvshow, year, 
season, episode, set_temp, rar, lang1, lang2, lang3 ):
                url = 
self.server_url+'/index.php?'+urllib.urlencode({'Fulltext':title,'FindUser':''})
                if not (tvshow == None or tvshow == ''):
@@ -170,9 +141,10 @@ class TitulkyClient(object):
                        url = 
self.server_url+'/index.php?'+urllib.urlencode({'Fulltext':title2,'FindUser':''})
                req = urllib2.Request(url)
                try:
-                       file_size='%.2f' % 
(float(os.path.getsize(file_original_path))/(1024*1024))
+                       size, SubHash = 
xbmc.subHashAndFileSize(file_original_path)
+                       file_size='%.2f' % (float(size)/(1024*1024))
                except:
-                       file_size=''
+                       file_size='-1'
                log(__name__,'Opening %s' % (url))
                response = urllib2.urlopen(req)
                content = response.read()
@@ -180,52 +152,86 @@ class TitulkyClient(object):
                log(__name__,'Done')
                subtitles_list = []
                max_downloads=1
-               for matches in re.finditer(subtitle_pattern, content, 
re.IGNORECASE | re.DOTALL):
-               #       print matches.group('id') +' ' 
+matches.group('title')+' '+ str(matches.group('sync'))+' '+ 
matches.group('tvshow')+' '+ matches.group('year')+' '+ 
matches.group('downloads')+' '+ matches.group('lang')+' '+ 
matches.group('cds')+' '+matches.group('size')
-                       file_name = matches.group('sync')
-                       if file_name == None: # if no sync info is found, just 
use title instead of None
-                               file_name = matches.group('title') 
-                       flag_image = "flags/%s.gif" % 
(lang2_opensubtitles(matches.group('lang')))
+               log(__name__,'Searching for subtitles')
+               for row in re.finditer('<tr class=\"r(.+?)</tr>', content, 
re.IGNORECASE | re.DOTALL):
+                       item = {}
+                       log(__name__,'New subtitle found')
+                       try:
+                               item['ID'] = re.search('[^<]+<td[^<]+<a 
href=\"[\w-]+-(?P<data>\d+).htm\"',row.group(1),re.IGNORECASE | re.DOTALL 
).group('data')
+                               item['title'] = 
re.search('[^<]+<td[^<]+<a[^>]+>(<div[^>]+>)?(?P<data>[^<]+)',row.group(1),re.IGNORECASE
 | re.DOTALL ).group('data')
+                               item['sync'] = ''
+                               sync_found = 
re.search('((.+?)</td>)[^>]+>[^<]*<a(.+?)title=\"(?P<data>[^\"]+)',row.group(1),re.IGNORECASE
 | re.DOTALL )
+                               if sync_found:
+                                       item['sync'] = sync_found.group('data')
+                               item['tvshow'] = 
re.search('((.+?)</td>){2}[^>]+>(?P<data>[^<]+)',row.group(1),re.IGNORECASE | 
re.DOTALL ).group('data')
+                               item['year'] = 
re.search('((.+?)</td>){3}[^>]+>(?P<data>[^<]+)',row.group(1),re.IGNORECASE | 
re.DOTALL ).group('data')
+                               item['downloads'] = 
re.search('((.+?)</td>){5}[^>]+>(?P<data>[^<]+)',row.group(1),re.IGNORECASE | 
re.DOTALL ).group('data')
+                               item['lang'] = 
re.search('((.+?)</td>){6}[^>]+><img 
alt=\"(?P<data>\w{2})\"',row.group(1),re.IGNORECASE | re.DOTALL ).group('data')
+                               item['numberOfDiscs'] = 
re.search('((.+?)</td>){7}[^>]+>(?P<data>[^<]+)',row.group(1),re.IGNORECASE | 
re.DOTALL ).group('data')
+                               item['size'] = 
re.search('((.+?)</td>){8}[^>]+>(?P<data>[\d\.]+)',row.group(1),re.IGNORECASE | 
re.DOTALL ).group('data')
+                       except:
+                               log(__name__,'Exception when parsing subtitle, 
all I got is  %s' % str(item))
+                               continue
+                       if item['sync'] == '': # if no sync info is found, just 
use title instead of None
+                               item['filename'] = item['title']
+                       else:
+                               item['filename'] = item['sync']
+                       item['language_flag'] = "flags/%s.gif" % 
(lang2_opensubtitles(item['lang']))
+                       
                        sync = False
-                       matches_sync=matches.group('sync')
-                       if not matches_sync == None and 
file_original_path.find(matches_sync) > -1:
+                       if not item['sync'] == '' and 
file_original_path.find(item['sync']) > -1:
+                               log(__name__,'found sync : filename match')
                                sync = True
-                       if file_size==matches.group('size'):
+                       if file_size==item['size']:
+                               log(__name__,'found sync : size match')
                                sync = True
+                       item['sync'] = sync
+                       
                        try:
-                               downloads = int(matches.group('downloads'))
+                               downloads = int(item['downloads'])
                                if downloads>max_downloads:
                                        max_downloads=downloads
                        except:
                                downloads=0
+                       item['downloads'] = downloads
+                       
                        if not year == '':
-                               if not matches.group('year') == year:
+                               if not item['year'] == year:
+                                       log(__name__,'year does not match, 
ignoring %s' % str(item))
                                        continue
-                       lang = lang_titulky2xbmclang(matches.group('lang'))
-                       if lang == lang1 or lang == lang2 or lang == lang3:
-                               subtitles_list.append( { 'title' : 
matches.group('title'), 'year' : matches.group('year'), "filename" : file_name, 
'language_name' : lang_titulky2xbmclang(matches.group('lang')), 'ID' : 
matches.group('id'), "mediaType" : 'mediaType', "numberOfDiscs" : '1', 
"downloads" : downloads, "sync" : sync, "rating" :'0', 
"language_flag":flag_image } )
+                       lang = lang_titulky2xbmclang(item['lang'])
+                       
+                       item['language_name'] = lang
+                       item['mediaType'] = 'mediaType'
+                       item['rating'] = '0'
+                       
+                       if lang in [lang1,lang2,lang3]:
+                               subtitles_list.append(item)
+                       else:
+                               log(__name__,'language does not match, ignoring 
%s' % str(item))
                # computing ratings is based on downloads
                for subtitle in subtitles_list:
                        subtitle['rating'] = 
str((subtitle['downloads']*10/max_downloads))
                return subtitles_list
+
        def get_cannot_download_error(self,content):
                if content.find('CHYBA') > -1:
                        return True
 
        def get_waittime(self,content):
-               for matches in re.finditer(countdown_pattern, content, 
re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('CountDown\((\d+)\)', content, 
re.IGNORECASE | re.DOTALL):
                        return int(matches.group(1))
 
        def get_link(self,content):
-               for matches in re.finditer(sublink_pattern, content, 
re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('<a?[= \w\"]+href="([^\"]+)\"', 
content, re.IGNORECASE | re.DOTALL):
                        return str(matches.group(1))
 
        def _get_session_id(self,content):
-               for matches in re.finditer(session_id_pattern, content, 
re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('secode.php\?PHPSESSID=([\w\d]+)', 
content, re.IGNORECASE | re.DOTALL):
                        return str(matches.group(1))
 
        def get_control_image(self,content):
-               for matches in re.finditer(control_image_pattern, content, 
re.IGNORECASE | re.DOTALL):
+               for matches in re.finditer('(secode.php\?[\w\d=]+)', content, 
re.IGNORECASE | re.DOTALL):
                        return '/'+str(matches.group(1))
                return None
 
diff --git a/script.xbmc.subtitles/resources/settings.xml 
b/script.xbmc.subtitles/resources/settings.xml
index d65694f..df25a3e 100644
--- a/script.xbmc.subtitles/resources/settings.xml
+++ b/script.xbmc.subtitles/resources/settings.xml
@@ -17,7 +17,9 @@
       <setting id="Bierdopje" type="bool" label="Bierdopje.com (TV Shows and 
Dutch/English subs only)" default="false"/>
       <setting id="Napiprojekt" type="bool" label="Napiprojekt.pl 
(Polish/English subs only)" default="false"/>
       <setting id="Napisy24pl" type="bool" label="Napisy24.pl (Mostly 
Polish/English subs)" default="false"/>
+      <setting id="Napisy24_type" type="enum" 
lvalues="30141|30142|30143|30144" visible= "eq(-1,true)" enable="eq(-1,true)" 
default="2" label="30140"/>
       <setting id="Napisyme" type="bool" label="Napisy.me (Mostly 
Polish/English subs from napisy24.pl database)" default="false"/>
+      <setting id="Napisyme_type" type="enum" 
lvalues="30141|30142|30143|30144" visible= "eq(-1,true)" enable="eq(-1,true)" 
default="2" label="30140"/>
       <setting id="LegendasTV" type="bool" label="Legendas.tv" 
default="false"/>
       <setting id="LTVuser" type="text"  visible= "eq(-1,true)" 
enable="eq(-1,true)" label="30123" default=""/>
       <setting id="LTVpass" type="text" option = "hidden" visible= 
"eq(-2,true)" enable="eq(-2,true)" label="30124" default=""/>              

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=5c38eaa971f6985025479e5e726430109e3aec7d

commit 5c38eaa971f6985025479e5e726430109e3aec7d
Author: amet <[email protected]>
Date:   Fri Nov 18 01:22:10 2011 +0400

    [weather.worldweatheronline] -v 1.0.4
    
    1.0.4
    - set UV Index to blank
    - handle sunny/clear properly

diff --git a/weather.worldweatheronline/addon.xml 
b/weather.worldweatheronline/addon.xml
index 8bb02c0..93e056f 100644
--- a/weather.worldweatheronline/addon.xml
+++ b/weather.worldweatheronline/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="weather.worldweatheronline"
        name="World Weather Online"
-       version="1.0.3"
+       version="1.0.4"
        provider-name="Team XBMC">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/weather.worldweatheronline/changelog.txt 
b/weather.worldweatheronline/changelog.txt
index d8c962c..e6e2ffb 100644
--- a/weather.worldweatheronline/changelog.txt
+++ b/weather.worldweatheronline/changelog.txt
@@ -1,3 +1,7 @@
+1.0.4
+- set UV Index to blank
+- handle sunny/clear properly
+
 1.0.3
 - added Dew Point and Feels Like, thx to FrostBox
 
diff --git a/weather.worldweatheronline/default.py 
b/weather.worldweatheronline/default.py
index 63d9bd6..1e074ba 100644
--- a/weather.worldweatheronline/default.py
+++ b/weather.worldweatheronline/default.py
@@ -57,6 +57,7 @@ def clear_properties():
     set_property("Current.FanartCode"      , "")
     set_property("Current.FeelsLike"       , "")
     set_property("Current.DewPoint"        , "")
+    set_property("Current.UVIndex"         , "")
     
     for i in range(4):
       set_property("Day%i.Title"       % i , "")
@@ -119,17 +120,23 @@ def forecast(city):
   humidity = get_elements(current,"humidity")
   wind     = get_elements(current,"windspeedKmph")
   code     = get_elements(current,"weatherCode")
+  desc     = get_elements(current,"weatherDesc")
   
-  set_property("Current.Condition"       , 
get_elements(current,"weatherDesc"))     # current condition in words
+  set_property("Current.Condition"       , desc)                               
     # current condition in words
   set_property("Current.Temperature"     , celsius)                            
     # temp in C, no need to set F, XBMC will convert it
   set_property("Current.Wind"            , wind)                               
     # wind speed in Km/h, no need for mph as XBMC will do the conversion
   set_property("Current.Humidity"        , humidity)                           
     # Humidity in %
   set_property("Current.winddirection"   , 
get_elements(current,"winddir16Point"))  # wind direction
   set_property("Current.FeelsLike"       , getFeelsLike(int(celsius), 
int(wind)))   # Feels like
   set_property("Current.DewPoint"        , getDewPoint(int(celsius), 
int(humidity)))# Dew Point
-  set_property("Current.OutlookIcon"     , "%s.png" % WEATHER_CODES[code])     
     # condition icon, utilities.py has more on this 
-  set_property("Current.FanartCode"      , WEATHER_CODES[code])                
     # fanart icon, utilities.py has more on this
-  
+  if (desc.startswith("Clear")):                                               
     # condition icon, utilities.py has more on this
+    set_property("Current.OutlookIcon"     , "%s.png" % "31")                  
     # fanart icon, utilities.py has more on this
+    set_property("Current.FanartCode"      , "31")                             
     # check for "Clear" and set the night image
+  else:                                                                        
     # otherwise set sunny one
+    set_property("Current.OutlookIcon"     , "%s.png" % WEATHER_CODES[code])   
     # 
+    set_property("Current.FanartCode"      , WEATHER_CODES[code])              
     # 
+  set_property("Current.UVIndex"         , "")                                 
     # UV Index, not in WWO so we set blank 
+
   weather = query.getElementsByTagName("weather")
   i = 0  
   for day in weather:

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

Summary of changes:
 script.xbmc.subtitles/addon.xml                    |    2 +-
 script.xbmc.subtitles/changelog.txt                |    7 ++
 .../resources/language/English/strings.xml         |    7 +-
 .../resources/language/Polish/strings.xml          |    1 +
 .../resources/language/Turkish/strings.xml         |   25 +++--
 .../resources/lib/services/Napisy24pl/service.py   |   13 ++-
 .../resources/lib/services/Napisyme/service.py     |   13 ++-
 .../resources/lib/services/Titulky/service.py      |  106 ++++++++++---------
 script.xbmc.subtitles/resources/settings.xml       |    2 +
 weather.worldweatheronline/addon.xml               |    2 +-
 weather.worldweatheronline/changelog.txt           |    4 +
 weather.worldweatheronline/default.py              |   15 ++-
 12 files changed, 127 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to