The branch, eden has been updated
       via  8c5478a71ee6ce04bbd4d7dc280fdd0887ba4d82 (commit)
      from  eb30932966e97f84f276d91e5017f9758c64f4a9 (commit)

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

commit 8c5478a71ee6ce04bbd4d7dc280fdd0887ba4d82
Author: unknown <[email protected]>
Date:   Wed Aug 8 13:09:01 2012 +0200

    [script.randomitems] -v3.1.4

diff --git a/script.randomitems/RandomItems.py 
b/script.randomitems/RandomItems.py
index b4d2263..8c6b765 100644
--- a/script.randomitems/RandomItems.py
+++ b/script.randomitems/RandomItems.py
@@ -2,7 +2,7 @@
 # *
 # *  Nuka for the original RecentlyAdded.py on which this is based
 # *
-# *  ppic, Hitcher,ronie & phil65 for the updates
+# *  ppic, Hitcher,ronie & phil65, Martijn for the updates
 
 import xbmc, xbmcgui, xbmcaddon
 import re, sys, os, random
@@ -88,7 +88,7 @@ class Main:
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         # separate the records
         json_response = simplejson.loads(json_query)
-        if json_response.has_key('result') and 
(json_response['result'].has_key('movies')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('movies'):
             json_response = json_response['result']['movies']
             # get total value
             total = str( len( json_response ) )
@@ -137,7 +137,7 @@ class Main:
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         # separate the records
         json_response = simplejson.loads(json_query)
-        if json_response.has_key('result') and 
(json_response['result'].has_key('episodes')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and (son_response['result'].has_key('episodes'):
             json_response = json_response['result']['episodes']
             # get total value
             total = str( len( json_response ) )
@@ -187,7 +187,7 @@ class Main:
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         # separate the records
         json_response = simplejson.loads(json_query)
-        if json_response.has_key('result') and 
(json_response['result'].has_key('musicvideos')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('musicvideos'):
             json_response = json_response['result']['musicvideos']
             # get total value
             total = str( len( json_response ) )
@@ -234,7 +234,7 @@ class Main:
         # separate the records
         json_response = simplejson.loads(json_query)
 
-        if json_response.has_key('result') and 
(json_response['result'].has_key('albums')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('albums'):
             json_response = json_response['result']['albums']
             # get total value
             total = str( len( json_response ) )
@@ -276,7 +276,7 @@ class Main:
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
 
-        if json_response.has_key('result') and 
(json_response['result'].has_key('artists')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('artists'):
             json_response = json_response['result']['artists']
             # get total value
             total = str( len( json_response ) )
@@ -313,7 +313,7 @@ class Main:
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         # separate the records
         json_response = simplejson.loads(json_query)
-        if json_response.has_key('result') and 
(json_response['result'].has_key('songs')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('songs'):
             json_response = json_response['result']['songs']
             # get total value
             total = str( len( json_response ) )
@@ -418,7 +418,7 @@ class Main:
         # separate the records
         json_response = simplejson.loads(json_query)
         # enumerate thru our records
-        if json_response.has_key('result') and 
(json_response['result'].has_key('songs')):
+        if json_response.has_key('result') and json_response.has_key['result'] 
!= None and json_response['result'].has_key('songs'):
             for item in json_response['result']['songs']:
                 song = item['file']
                 fanart = item['fanart']
diff --git a/script.randomitems/addon.xml b/script.randomitems/addon.xml
index aadf4a2..2916be6 100644
--- a/script.randomitems/addon.xml
+++ b/script.randomitems/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="script.randomitems" name="Random Items script" version="3.1.3" 
provider-name="Hitcher, ronie, phil65">

+<addon id="script.randomitems" name="Random Items script" version="3.1.4" 
provider-name="Hitcher, ronie, phil65, Martijn">

        <requires>

                <import addon="xbmc.python" version="2.0"/>

                <import addon="script.module.elementtree" version="1.2.7"/>

diff --git a/script.randomitems/changelog.txt b/script.randomitems/changelog.txt
index c336d25..ed01512 100644
--- a/script.randomitems/changelog.txt
+++ b/script.randomitems/changelog.txt
@@ -1,3 +1,6 @@
+v3.1.4
+- fix error on empty JSON-RPC result
+
 v3.1.3
 - don't error on invalid addon.xml files
 

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

Summary of changes:
 script.randomitems/RandomItems.py |   16 ++++++++--------
 script.randomitems/addon.xml      |    2 +-
 script.randomitems/changelog.txt  |    3 +++
 3 files changed, 12 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to