The branch, eden has been updated
       via  3ce504556b31e2fcc15ef9b734f854a3f127234d (commit)
      from  53f6a6133f8d25f3fc1663bc62880fd439b9ebbb (commit)

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

commit 3ce504556b31e2fcc15ef9b734f854a3f127234d
Author: ronie <[email protected]>
Date:   Fri Mar 23 21:29:18 2012 +0100

    [script.artworkorganizer] -v0.1.9
    
    use label for seasons instead of title

diff --git a/script.artworkorganizer/addon.xml 
b/script.artworkorganizer/addon.xml
index c8cbd97..04b1a17 100644
--- a/script.artworkorganizer/addon.xml
+++ b/script.artworkorganizer/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.artworkorganizer" name="Artwork Organizer" version="0.1.8" 
provider-name="ronie">
+<addon id="script.artworkorganizer" name="Artwork Organizer" version="0.1.9" 
provider-name="ronie">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
diff --git a/script.artworkorganizer/changelog.txt 
b/script.artworkorganizer/changelog.txt
index 3821e2b..af65196 100644
--- a/script.artworkorganizer/changelog.txt
+++ b/script.artworkorganizer/changelog.txt
@@ -1,3 +1,7 @@
+v0.1.9
+- use label for seasons
+- fix progressbars
+
 v0.1.8
 - use title instead of label
 
diff --git a/script.artworkorganizer/default.py 
b/script.artworkorganizer/default.py
index 50aa85f..8e9cd4b 100644
--- a/script.artworkorganizer/default.py
+++ b/script.artworkorganizer/default.py
@@ -161,8 +161,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "fanart", "year"] 
}, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('movies'):
+            totalitems = len( json_response['result']['movies'] )
             for item in json_response['result']['movies']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -191,8 +191,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "fanart"] }, 
"id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('tvshows'):
+            totalitems = len( json_response['result']['tvshows'] )
             for item in json_response['result']['tvshows']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -220,8 +220,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "fanart", 
"artist"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('musicvideos'):
+            totalitems = len( json_response['result']['musicvideos'] )
             for item in json_response['result']['musicvideos']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -250,8 +250,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"AudioLibrary.GetArtists", "params": {"properties": ["fanart"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('artists'):
+            totalitems = len( json_response['result']['artists'] )
             for item in json_response['result']['artists']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -279,8 +279,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "thumbnail", 
"year"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('movies'):
+            totalitems = len( json_response['result']['movies'] )
             for item in json_response['result']['movies']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -309,8 +309,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "thumbnail"] }, 
"id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('tvshows'):
+            totalitems = len( json_response['result']['tvshows'] )
             for item in json_response['result']['tvshows']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -347,18 +347,18 @@ class Main:
                 tvshowids.append(tvshowid)
             for tvshowid in tvshowids:
                 processeditems = 0
-                json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetSeasons", "params": {"properties": ["title", "thumbnail", 
"showtitle"], "tvshowid":%s }, "id": 1}' % tvshowid)
+                json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetSeasons", "params": {"properties": ["thumbnail", "showtitle"], 
"tvshowid":%s }, "id": 1}' % tvshowid)
                 json_query = unicode(json_query, 'utf-8', errors='ignore')
                 json_response = simplejson.loads(json_query)
-                totalitems = len( json_response )
                 if json_response['result'].has_key('seasons'):
+                    totalitems = len( json_response['result']['seasons'] )
                     for item in json_response['result']['seasons']:
                         if self.dialog.iscanceled():
                             log('script cancelled')
                             return
                         processeditems = processeditems + 1
                         self.dialog.update( int( float( processeditems ) / 
float( totalitems ) * 100), __language__(32007) + ': ' + str( count + 1 ) )
-                        name = item['title']
+                        name = item['label']
                         tvshow = item['showtitle']
                         artwork = item['thumbnail'][:-4]
                         tmp_filename = tvshow + ' - ' + name
@@ -380,8 +380,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetEpisodes", "params": {"properties": ["title", "thumbnail", 
"season", "episode", "showtitle"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('episodes'):
+            totalitems = len( json_response['result']['episodes'] )
             for item in json_response['result']['episodes']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -413,8 +413,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetMusicVideos", "params": {"properties": ["title", "thumbnail", 
"artist"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('musicvideos'):
+            totalitems = len( json_response['result']['musicvideos'] )
             for item in json_response['result']['musicvideos']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -443,8 +443,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"AudioLibrary.GetArtists", "params": {"properties": ["thumbnail"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('artists'):
+            totalitems = len( json_response['result']['artists'] )
             for item in json_response['result']['artists']:
                 if self.dialog.iscanceled():
                     log('script cancelled')
@@ -472,8 +472,8 @@ class Main:
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"AudioLibrary.GetAlbums", "params": {"properties": ["title", "thumbnail", 
"artist"] }, "id": 1}')
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_response = simplejson.loads(json_query)
-        totalitems = len( json_response )
         if json_response['result'].has_key('albums'):
+            totalitems = len( json_response['result']['albums'] )
             for item in json_response['result']['albums']:
                 if self.dialog.iscanceled():
                     log('script cancelled')

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

Summary of changes:
 script.artworkorganizer/addon.xml     |    2 +-
 script.artworkorganizer/changelog.txt |    4 ++++
 script.artworkorganizer/default.py    |   26 +++++++++++++-------------
 3 files changed, 18 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to