The branch, frodo has been updated
       via  2d11e0125c62a7bf3cba60fa0b2c61218e088085 (commit)
       via  2b0946f0dd004fd4f3e1b5a5744f199334b200b0 (commit)
      from  7d4b30e38721a51a1a3d567b64fa132b94b69595 (commit)

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

commit 2d11e0125c62a7bf3cba60fa0b2c61218e088085
Author: Martijn Kaijser <[email protected]>
Date:   Sat Feb 8 21:35:26 2014 +0100

    [script.xbmcbackup] 0.4.5

diff --git a/script.xbmcbackup/addon.xml b/script.xbmcbackup/addon.xml
index c3e7668..da1695d 100644
--- a/script.xbmcbackup/addon.xml
+++ b/script.xbmcbackup/addon.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.xbmcbackup"
-    name="XBMC Backup" version="0.4.4" provider-name="robweber">
+    name="XBMC Backup" version="0.4.5" provider-name="robweber">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
   </requires>
diff --git a/script.xbmcbackup/changelog.txt b/script.xbmcbackup/changelog.txt
index f334767..3becb42 100644
--- a/script.xbmcbackup/changelog.txt
+++ b/script.xbmcbackup/changelog.txt
@@ -1,3 +1,9 @@
+Version 0.4.5
+
+added version info to logs
+
+added try/catch for unicode errors
+
 Version 0.4.4
 
 modified the check for invalid file types
diff --git a/script.xbmcbackup/resources/lib/utils.py 
b/script.xbmcbackup/resources/lib/utils.py
index bc1814a..8d1d1c8 100644
--- a/script.xbmcbackup/resources/lib/utils.py
+++ b/script.xbmcbackup/resources/lib/utils.py
@@ -14,7 +14,7 @@ def openSettings():
     __Addon.openSettings()
 
 def log(message,loglevel=xbmc.LOGNOTICE):
-    xbmc.log(encode(__addon_id__ + ": " + message),level=loglevel)
+    xbmc.log(encode(__addon_id__ + "-" + __Addon.getAddonInfo('version') +  ": 
" + message),level=loglevel)
 
 def showNotification(message):
     xbmc.executebuiltin("Notification(" + encode(getString(30010)) + "," + 
encode(message) + ",4000," + xbmc.translatePath(__Addon.getAddonInfo('path') + 
"/icon.png") + ")")
@@ -29,4 +29,11 @@ def getString(string_id):
     return __Addon.getLocalizedString(string_id)
 
 def encode(string):
-    return string.encode('UTF-8','replace')
+    result = ''
+
+    try:
+        result = string.encode('UTF-8','replace')
+    except UnicodeDecodeError:
+        result = 'Unicode Error'
+    
+    return result

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

commit 2b0946f0dd004fd4f3e1b5a5744f199334b200b0
Author: Martijn Kaijser <[email protected]>
Date:   Sat Feb 8 21:34:06 2014 +0100

    [screensaver.randomtrailers] 1.1.10

diff --git a/screensaver.randomtrailers/addon.xml 
b/screensaver.randomtrailers/addon.xml
index eebcfd0..e5a7e48 100644
--- a/screensaver.randomtrailers/addon.xml
+++ b/screensaver.randomtrailers/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <addon id="screensaver.randomtrailers"
        name="Random Trailers"
-       version="1.1.9"
+       version="1.1.10"
        provider-name="kzeleny">
   <requires>
     <import addon="xbmc.python"                                        
version="2.1.0"/>
diff --git a/screensaver.randomtrailers/changelog.txt 
b/screensaver.randomtrailers/changelog.txt
index 3076172..d65a068 100644
--- a/screensaver.randomtrailers/changelog.txt
+++ b/screensaver.randomtrailers/changelog.txt
@@ -1,3 +1,6 @@
+v.1.10 (February, 07, 2014)
+- fixed issue playing library trailers
+
 v.1.1.9 (February, 05,2014)
 - fixed issue causing crash for not standard ascii characters. Fix EOL
 
diff --git a/screensaver.randomtrailers/default.py 
b/screensaver.randomtrailers/default.py
index 2ab0c82..6c0efa5 100644
--- a/screensaver.randomtrailers/default.py
+++ b/screensaver.randomtrailers/default.py
@@ -1,7 +1,7 @@
 # Random trailer player
 #
 # Author - kzeleny
-# Version - 1.1.9
+# Version - 1.1.10
 # Compatibility - Frodo/Gothum
 #
 
@@ -306,17 +306,18 @@ def getItunesTrailers():
     
 def getLibraryTrailers(genre):
     # get the raw JSON output
-    trailers=[]
+    lib_trailers=[]
+    tmp_trailers=''
     trailerstring = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "lastplayed", 
"studio", "cast", "plot", "writer", "director", "fanart", "runtime", "mpaa", 
"thumbnail", "file", "year", "genre", "trailer"], "filter": {"field": "genre", 
"operator": "contains", "value": "%s"}}, "id": 1}' % genre)
-    trailerstring = unicode(trailerstring, 'utf-8', errors='ignore')
-    tmp_trailers = json.loads(trailerstring)  
-    if 'movies' in tmp_trailers:
-        tmp_trailers = tmp_trailers["result"]["movies"]  
+    trailerstring = unicode(trailerstring, 'utf-8', errors='ignore') 
+    trailerstring = json.loads(trailerstring)
+    if trailerstring['result']['limits']['total'] > 0:
+        tmp_trailers = trailerstring["result"]["movies"]  
         for trailer in tmp_trailers:
             trailer['source'] = 'library'
             trailer['type'] = 'Trailer'
-            trailers.append(trailer)
-    return trailers
+            lib_trailers.append(trailer)
+    return lib_trailers
 
 def getFolderTrailers(path):
     trailers = []

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

Summary of changes:
 screensaver.randomtrailers/addon.xml     |    2 +-
 screensaver.randomtrailers/changelog.txt |    3 +++
 screensaver.randomtrailers/default.py    |   17 +++++++++--------
 script.xbmcbackup/addon.xml              |    2 +-
 script.xbmcbackup/changelog.txt          |    6 ++++++
 script.xbmcbackup/resources/lib/utils.py |   11 +++++++++--
 6 files changed, 29 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to