The branch, eden has been updated
       via  f5a605ec673290f55b690f614a93f349ac9d20ca (commit)
       via  ddb29648aa3d02f7abfec414cc54716e879d6f0c (commit)
       via  ff7d6a862f6a1c7296c0137141eccc673c4e6db0 (commit)
      from  7694d30563fa0071f65836e8c4cfcdc2acecbbda (commit)

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

commit f5a605ec673290f55b690f614a93f349ac9d20ca
Author: Martijn Kaijser <[email protected]>
Date:   Wed Dec 5 20:03:25 2012 +0100

    [weather.ozweather] -v0.4.5

diff --git a/weather.ozweather/addon.xml b/weather.ozweather/addon.xml
index 0cd0d5b..8bce409 100644
--- a/weather.ozweather/addon.xml
+++ b/weather.ozweather/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="weather.ozweather" name="Oz Weather" version="0.4.3" 
provider-name="Bossanova808">
+<addon id="weather.ozweather" name="Oz Weather" version="0.4.5" 
provider-name="Bossanova808">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
     <import addon="script.module.parsedom" version="1.2.0"/>
diff --git a/weather.ozweather/changelog.txt b/weather.ozweather/changelog.txt
index db3db7f..6b8b922 100644
--- a/weather.ozweather/changelog.txt
+++ b/weather.ozweather/changelog.txt
@@ -1,3 +1,6 @@
+V0.4.4
+- Minor data cleanup as Weatherzone returns crap data sometimes
+
 V0.4.3
 - Fixes for fixes for capatilisation :)
 
diff --git a/weather.ozweather/default.py b/weather.ozweather/default.py
index 1c845cc..0467051 100644
--- a/weather.ozweather/default.py
+++ b/weather.ozweather/default.py
@@ -433,6 +433,9 @@ def propertiesPDOM(page, extendedFeatures):
 
       for count, desc in enumerate(shortDesc):
         shortDesc[count] = shortDesc[count].title().replace( '-<br />','')
+        shortDesc[count] = shortDesc[count].title().replace( '-<Br />','')
+        shortDesc[count] = shortDesc[count].title().replace( 
'ThunderStorms','Thunderstorms')
+        shortDesc[count] = shortDesc[count].title().replace( 'windy','Windy')
 
       #log the collected data, helpful for finding errors
       #log("Collected data: shortDesc [" + str(shortDesc) + "] maxList [" + 
str(maxList) +"] minList [" + str(minList) + "]")
diff --git a/weather.ozweather/resources/lib/utilities.py 
b/weather.ozweather/resources/lib/utilities.py
index c61758f..17d8965 100644
--- a/weather.ozweather/resources/lib/utilities.py
+++ b/weather.ozweather/resources/lib/utilities.py
@@ -43,6 +43,7 @@ WEATHER_CODES = { 'Clearing Shower'                 : '39',
                   'Snow Tending To Rain'            : '5',
                   'Sunny'                           : '32',
                   'Thunderstorms'                   : '38',
+                  'ThunderStorms'                   : '38',
                   'Thunderstorms Clearing'          : '37',
                   'Windy'                           : '23',
                   'Windy With Rain'                 : '2',

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

commit ddb29648aa3d02f7abfec414cc54716e879d6f0c
Author: Martijn Kaijser <[email protected]>
Date:   Wed Dec 5 19:58:57 2012 +0100

    [script.linphone] -v0.0.9

diff --git a/script.linphone/addon.xml b/script.linphone/addon.xml
index aedbf7d..bd42a11 100644
--- a/script.linphone/addon.xml
+++ b/script.linphone/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.linphone"
        name="Linphonec"
-       version="0.0.8"
+       version="0.0.9"
        provider-name="PostMet Corporation">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.linphone/resources/lib/gui.py 
b/script.linphone/resources/lib/gui.py
index 6699d32..c1346e9 100644
--- a/script.linphone/resources/lib/gui.py
+++ b/script.linphone/resources/lib/gui.py
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+B# -*- coding: utf-8 -*-
 # *
 # *      Copyright (C) 2012 Postmet corp
 # *      http://www.postmet.com
@@ -150,7 +150,8 @@ class GUI( xbmcgui.WindowXML ):
         list_top_pos = int(HEIGHT / 720) + 90
 
         self.addControl(xbmcgui.ControlImage(970, list_top_pos - 3, 306, 306, 
__cwd__ + '/resources/skins/Default/media/list_bg.png'))
-        self.list_contacts = xbmcgui.ControlList(973, list_top_pos, 300, 330, 
font = 'font12', selectedColor = "0xFF000000", textColor = '0xFFFFFFFF', 
buttonTexture = 'button-nofocus.png', buttonFocusTexture = 'button-focus.png', 
itemHeight = 25, space = 2)
+        self.list_contacts = xbmcgui.ControlList(973, list_top_pos, 300, 330, 
'font12', '0xFFFFFFFF', 'button-nofocus.png', 'button-focus.png', "0xFF000000", 
0, 0, 0, 0, 25, 2)
+
         self.addControl(self.list_contacts)
         self.control_list_contacts_id = self.list_contacts.getId()
 
@@ -562,6 +563,7 @@ def linphoneTerminate():
     global last_try_exit
     global last_try_exit_cnt
     global notifier
+    global list_type
     xbmc.log("##### [%s] - Debug msg: %s" % (__scriptname__, 
call_status),level=xbmc.LOGDEBUG )
 
     tpass = (time.time() - last_try_exit)
@@ -585,6 +587,10 @@ def linphoneTerminate():
         fixUpDown(False, False)
         time.sleep(1)
         placed, recieved, last_calls = parsing('/home/%s/.linphonerc' % 
(SYSTEM_USER))
+        if list_type == 'recent':
+            LP_WIN.list_contacts.reset()
+            LP_WIN.list_contacts.addItems(last_calls)
+
         #else:
         #    LP_WIN.btn_hangup.setVisible(False)
         #    LP_WIN.btn_answer.setVisible(False)
@@ -710,25 +716,6 @@ def fixUpDown(answer, hangup):
     b5005Up = 5010 if is_full_ver else b500xUp
     LP_WIN.getControl(5005).controlUp(LP_WIN.getControl(b5005Up))
 
-    #if answer:
-    #    ctrl_down = 5002
-    #    ctrl_up = 5002
-    #elif hangup:
-    #    ctrl_down = 5004
-    #    ctrl_up = 5004
-    #else:
-    #    ctrl_down = 5010
-    #    ctrl_up = 5011
-    #LP_WIN.getControl(5011).controlDown(LP_WIN.getControl(ctrl_down))
-    #LP_WIN.getControl(5010).controlUp(LP_WIN.getControl(ctrl_up))
-    #if answer and hangup:
-    #    LP_WIN.getControl(5002).controlRight(LP_WIN.getControl(5004)) # from 
Dial to Hangup
-    #    LP_WIN.getControl(5004).controlLeft(LP_WIN.getControl(5002))
-    #elif answer:
-    #    LP_WIN.getControl(5004).controlLeft(LP_WIN.getControl(5004))
-    #elif hangup:
-    #    LP_WIN.getControl(5002).controlLeft(LP_WIN.getControl(5002))
-
 def initLinphone():
     ##------------------Initialisation Settings----------------------##
     array = ["sip_port", "sip_tcp_port", "sip_tls_port"]
@@ -890,10 +877,11 @@ def set_phone_book(pb):
     f.close()
 
 def sound_card_list_creating(soundcard_list):
+    if os.path.isfile(__cwd__ + '/soundcards'):
+        limitLinphonecCodecs()
     try:
         f = open(__cwd__ + '/soundcards', 'w')
     except:
-        limitLinphonecCodecs()
         os.system("touch %s" % __cwd__ + '/soundcards')
         f = open(__cwd__ + '/soundcards', 'w')
     for i in soundcard_list:
@@ -931,9 +919,4 @@ def parsing(filename):
 
 pb = get_phone_book()
 placed, recieved, last_calls = parsing('/home/' + SYSTEM_USER + '/.linphonerc')
-cmd = str()
-
-# 91.189.95.83
-# register_only_when_network_is_up
-# reg_sendregister=0
-#dpkg -i .deb
\ No newline at end of file
+cmd = str()
\ No newline at end of file

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

commit ff7d6a862f6a1c7296c0137141eccc673c4e6db0
Author: Martijn Kaijser <[email protected]>
Date:   Wed Dec 5 19:55:34 2012 +0100

    [script.xbmc.subtitles] -v3.5.1

diff --git a/script.xbmc.subtitles/addon.xml b/script.xbmc.subtitles/addon.xml
index 97f41ef..94c465e 100755
--- 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="3.5.0"
+       version="3.5.1"
        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 44153d9..a5d6d73 100644
--- a/script.xbmc.subtitles/changelog.txt
+++ b/script.xbmc.subtitles/changelog.txt
@@ -1,3 +1,7 @@
+3.5.1
+- [fix] service Ondertitel.com after site redesign, mr-blobby
+- [fix] Bierdopje.com for empty tvdb id's in database, mr-blobby
+
 3.5.0
 - [fix] Bierdopje service, mr-blobby
 - [fix] Subscene service, publicENEMY
diff --git a/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py 
b/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
index e660f36..dd5c9af 100644
--- a/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Bierdopje/service.py
@@ -75,8 +75,13 @@ def getshowid(showname):
         showids_filedata = file(showids_filename,'r').read()
         showids = eval(showids_filedata)
         if showname in showids:
-            log( __name__ ," show id for '%s' is '%s' (from cachefile '%s')" % 
(showname, showids[showname], showids_filename))
-            return showids[showname]
+            if showids[showname] != '16178':
+                log( __name__ ," show id for '%s' is '%s' (from cachefile 
'%s')" % (showname, showids[showname], showids_filename))
+                return showids[showname]
+            else:
+                log( __name__ ," removing invalid show id '%s' for '%s' from 
from cachefile '%s'" % (showids[showname], showname, showids_filename))
+                del showids[showname]
+                file(showids_filename,'w').write(repr(showids))
     if showid is None:
         try:
             playerid_query = '{"jsonrpc": "2.0", "method": 
"Player.GetActivePlayers", "id": 1}'
@@ -88,14 +93,15 @@ def getshowid(showname):
         except:
             log( __name__ ," Failed to find TVDBid in database")
         else:
-            response = apicall("GetShowByTVDBID",[tvdbid])
-            if response is not None:
-                showid = gettextelements(response,"response/showid")
-                if len(showid) == 1:
-                    log( __name__ ," show id for '%s' is '%s' (found by TVDBid 
%s)" % (showname, str(showid[0]), tvdbid))
-                    showids[showname] = str(showid[0])
-                    file(showids_filename,'w').write(repr(showids))
-                    return str(showid[0])
+            if tvdbid != '':
+                response = apicall("GetShowByTVDBID",[tvdbid])
+                if response is not None:
+                    showid = gettextelements(response,"response/showid")
+                    if len(showid) == 1:
+                        log( __name__ ," show id for '%s' is '%s' (found by 
TVDBid %s)" % (showname, str(showid[0]), tvdbid))
+                        showids[showname] = str(showid[0])
+                        file(showids_filename,'w').write(repr(showids))
+                        return str(showid[0])
     response = apicall("GetShowByName",[showname])
     if response is not None:
         showid = gettextelements(response,"response/showid")
@@ -236,4 +242,4 @@ def download_subtitles (subtitles_list, pos, zip_subs, 
tmp_sub_dir, sub_folder,
             log( __name__ ," failed to save subtitles to '%s'" % 
local_tmp_file )
         else:
             language = subtitles_list[pos][ "language_name" ]
-            return False, language, local_tmp_file #standard output
+            return False, language, local_tmp_file #standard output
\ No newline at end of file
diff --git a/script.xbmc.subtitles/resources/lib/services/Ondertitel/service.py 
b/script.xbmc.subtitles/resources/lib/services/Ondertitel/service.py
index 35dc22c..41634e2 100644
--- a/script.xbmc.subtitles/resources/lib/services/Ondertitel/service.py
+++ b/script.xbmc.subtitles/resources/lib/services/Ondertitel/service.py
@@ -7,6 +7,7 @@ _ = sys.modules[ "__main__" ].__language__
 
 main_url = "http://ondertitel.com/";
 debug_pretext = ""
+releases_types   = ['web-dl', '480p', '720p', '1080p', 'h264', 'x264', 'xvid', 
'aac20', 'hdtv', 'dvdrip', 'ac3', 'bluray', 'dd51', 'divx', 'proper', 'repack', 
'pdtv', 'rerip', 'dts']
 
 
#====================================================================================================================
 # Regular expression patterns
@@ -14,18 +15,13 @@ debug_pretext = ""
 
 # subtitle pattern example:
 """
-<strong><a href="/ondertitels/info/Avatar/48039.html" title="ondertitels 
Avatar" style="color: #000;">Avatar</a></strong> <img 
src="/images/nederlandse_vlag.jpg" height="15" width="20"> <a 
href="http://trailer-cinema.com/trailer/info/Avatar/Avatar.html"; 
target="_blank"><img src="/images/icon_play-trailer.png" height="15" 
border="0"></a><br>
-                       <font style="font-size: 11px; color: 
#444445;"><i>Avatar.RETAIL.DVDRip.XviD-DiAMOND</i></font>
-                               </div>
-                               </td>
-                               <td><a 
href="http://www.imdb.com/title/tt0499549/"; target="_blank"><img 
src="/images/imdb_logo.gif" border="0"></a></td>
-
-                               <td style="width: 60px;">3 CD's</td><td><a 
href="/user_list.php?user=Goffini">Goffini</a></td></tr>
+<a href="/ondertitels/info/(500)-Days-of-Summer/44032.html" title="ondertitel 
(500) Days of Summer" style="color: #000;">(500) Days of Summer</a></strong> 
<img src="/images/nederlandse_vlag.jpg" height="11" width="18"></div> <div 
style="float:left;"><a href="http://www.imdb.com/title/tt1022603/"; 
target="_blank"><img src="/images/imdb_logo.gif" border="0"></a> </div><br 
clear="both"></div>
+                                                       <div style="width: 
490px; overflow:hidden; overflow:hidden"><font style="font-size: 11px; color: 
#444445;"><i>500.Days.of.Summer.2009.720p.BluRay.DTS.x264-WiKi</i></font><br></div>
 """
-subtitle_pattern = "<strong><a 
href=\"/(ondertitels/info/[^\n\r\t]*?.html)\"[^\n\r\t]*?>\
-[\n\r\t ]*?<font style=\"font-size: 11px; color: 
#444445;\"><i>([^\r\n\t]*?)</i></font>[\n\r\t ]*?</div>[\n\r\t ]*?</td>\
-[\n\r\t ]*?<td>[^\r\n\t]*?</td>[\r\n\t ]*?<td style=\"width: 60px;\">(\d) CD"
-# group(1) = link to page with downloadlink, group(2) = filename, group(3) = 
number of CD's
+subtitle_pattern = "<a href=\"(/ondertitels/info/[^/\n\r\t]+/\d+?\.html)\" 
title=\"[^/\n\r\t]+\" style=\"color: #000;\">[^\n\r\t]*?[\n\r\t]+\
+<div style=\"width: 490px; overflow:hidden; overflow:hidden\"><font 
style=\"font-size: 11px; color: 
#444445;\"><i>([^\n\r\t<]+?)</i></font><br></div>"
+# group(1) = link, group(2) = filename
+
 
 # downloadlink pattern example:
 """
@@ -38,33 +34,48 @@ downloadlink_pattern = "<a 
href=\"/(getdownload\.php\?id=\d{1,10}&userfile=[^\n\
 # Functions
 
#====================================================================================================================
 
-def getallsubs(content, title, moviefile, subtitles_list, ):
+def getallsubs(content, title, moviefile, subtitles_list):
     for matches in re.finditer(subtitle_pattern, content, re.IGNORECASE | 
re.DOTALL):
-        if matches.group(3) == "1" and matches.group(2) <> "":
-            link = matches.group(1)
-            filename = matches.group(2)
-            log( __name__ ,"%s Subtitles found: %s (link=%s)" % 
(debug_pretext, filename, link))
-            if isexactmatch(filename, moviefile):
-                subtitles_list.append({'rating': '0', 'no_files': 1, 'movie':  
title, 'filename': filename, 'sync': True, 'link': link, 'language_flag': 
'flags/nl.gif', 'language_name': 'Dutch'})
-            else:
-                subtitles_list.append({'rating': '0', 'no_files': 1, 'movie':  
title, 'filename': filename, 'sync': False, 'link': link, 'language_flag': 
'flags/nl.gif', 'language_name': 'Dutch'})
-
-
-def isexactmatch(subsfile, moviefile):
-    match = re.match("(.*)\.", moviefile)
-    if match:
-        moviefile = string.lower(match.group(1))
-        subsfile = string.lower(subsfile)
-        log( __name__ ," comparing subtitle file with moviefile to see if it 
is a match (sync):\nsubtitlesfile  = '%s'\nmoviefile      = '%s'" % 
(string.lower(subsfile), string.lower(moviefile)) )
-        if string.lower(subsfile) == string.lower(moviefile):
-            log( __name__ ," found matching subtitle file, marking it as 
'sync': '%s'" % (string.lower(subsfile)) )
-            return True
+        link = matches.group(1)
+        filename = matches.group(2)
+        log( __name__ ,"%s Subtitles found: %s (link=%s)" % (debug_pretext, 
filename, link))
+        if isexactmatch(filename, moviefile):
+            sync = True
+            rating = 10
         else:
-            return False
+            rating = getrating(filename, moviefile)
+            sync = False
+            subtitles_list.append({'rating': str(rating), 'no_files': 1, 
'movie':  title, 'filename': filename, 'sync': sync, 'link': link, 
'language_flag': 'flags/nl.gif', 'language_name': 'Dutch'})
+
+def getrating(subsfile, videofile):
+    rating = 0
+    videofile = "".join(string.split(videofile, '.')[:-1])
+    videofile = string.lower(videofile)
+    subsfile = string.lower(subsfile)
+    videofile = string.replace(videofile, '.', '')
+    subsfile = string.replace(subsfile, '.', '')
+    for release_type in releases_types:
+        if (release_type in videofile) and (release_type in subsfile): rating 
+= 1
+    if string.split(videofile, '-')[-1] == string.split(subsfile, '-')[-1] : 
rating += 1
+    if rating > 0:
+        rating = rating * 2 - 1
+        if rating > 9: rating = 9
+    return rating
+
+def isexactmatch(subsfile, videofile):
+    videofile = "".join(string.split(videofile, '.')[:-1])
+    videofile = string.lower(videofile)
+    videofile = string.replace(videofile, ' ', '.')
+    videofile = string.replace(videofile, '.', '')
+    subsfile = string.replace(subsfile, '.', '')
+    subsfile = string.lower(subsfile)
+    log( __name__ ," comparing subtitle file with videofile 
(sync?):\nsubtitlesfile  = '%s'\nvideofile      = '%s'" % (subsfile, videofile) 
)
+    if string.find(subsfile, videofile) > -1:
+        log( __name__ ," found matching subtitle file, marking it as 'sync': 
'%s'" % (subsfile) )
+        return True
     else:
         return False
 
-
 def getdownloadlink(content):
     link = None
     i = 0
@@ -104,6 +115,7 @@ def search_subtitles( file_original_path, title, tvshow, 
year, season, episode,
                 log( __name__ ,"%s Getting subs ..." % debug_pretext)
                 moviefile = os.path.basename(file_original_path)
                 getallsubs(content, title, moviefile, subtitles_list)
+                subtitles_list.sort(key=lambda x: [ x['sync'], x['rating']], 
reverse = True)
         else:
             log( __name__ ,"%s Dutch language is not selected" % 
(debug_pretext))
             msg = "Won't work, Ondertitel is only for Dutch subtitles."

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

Summary of changes:
 script.linphone/addon.xml                          |    2 +-
 script.linphone/resources/lib/gui.py               |   39 +++-------
 script.xbmc.subtitles/addon.xml                    |    2 +-
 script.xbmc.subtitles/changelog.txt                |    4 +
 .../resources/lib/services/Bierdopje/service.py    |   28 ++++---
 .../resources/lib/services/Ondertitel/service.py   |   78 +++++++++++--------
 weather.ozweather/addon.xml                        |    2 +-
 weather.ozweather/changelog.txt                    |    3 +
 weather.ozweather/default.py                       |    3 +
 weather.ozweather/fanart.jpg                       |  Bin 0 -> 177561 bytes
 .../resources/lib}/.gitignore                      |    0
 weather.ozweather/resources/lib/utilities.py       |    1 +
 12 files changed, 87 insertions(+), 75 deletions(-)
 create mode 100644 weather.ozweather/fanart.jpg
 copy {service.libraryautoupdate => weather.ozweather/resources/lib}/.gitignore 
(100%)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to