The branch, frodo has been updated
       via  a5f3b4f1a41d35a8c7d00d1ca7415dcde85c95fd (commit)
      from  7afd175db12cc4407544092ca1bb2fdc1eb83106 (commit)

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

commit a5f3b4f1a41d35a8c7d00d1ca7415dcde85c95fd
Author: Martijn Kaijser <[email protected]>
Date:   Mon Jan 21 12:51:03 2013 +0100

    [script.randomandlastitems] -2.0.3

diff --git a/script.randomandlastitems/addon.xml 
b/script.randomandlastitems/addon.xml
index 7daefed..f9c263b 100644
--- a/script.randomandlastitems/addon.xml
+++ b/script.randomandlastitems/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.randomandlastitems" name="Random and Last items script" 
version="2.0.2" provider-name="MikeBZH44, Martijn">
+<addon id="script.randomandlastitems" name="Random and Last items script" 
version="2.0.3" provider-name="MikeBZH44, Martijn">
        <requires>
                <import addon="xbmc.python" version="2.1.0"/>
         <import addon="xbmc.json" version="6.0.0"/>
diff --git a/script.randomandlastitems/changelog.txt 
b/script.randomandlastitems/changelog.txt
index 3879b74..20155e8 100644
--- a/script.randomandlastitems/changelog.txt
+++ b/script.randomandlastitems/changelog.txt
@@ -1,3 +1,6 @@
+v2.0.3
+- Fix missing id error
+
 v2.0.2
 - Try to fix missing dateadded sort key
 - add missing urllib imprt
diff --git a/script.randomandlastitems/randomandlastitems.py 
b/script.randomandlastitems/randomandlastitems.py
index 847d85f..29b2d94 100644
--- a/script.randomandlastitems/randomandlastitems.py
+++ b/script.randomandlastitems/randomandlastitems.py
@@ -156,7 +156,6 @@ def _getMovies ( ):
             path = media_path(_movie['file'])
             play = 'XBMC.RunScript(' + __addonid__ + ',movieid=' + 
str(_movie.get('id')) + ')'
             art = _movie['art']
-            #print _movie['streamdetails']
             streaminfo = 
media_streamdetails(_movie['file'].encode('utf-8').lower(),
                                        _movie['streamdetails'])
             # Temporary check if runtime is an int or str
@@ -225,10 +224,9 @@ def _getEpisodesFromPlaylist ( ):
                 break
             if _file['type'] == 'tvshow':
                 _tvshows += 1
-                # La playlist fournie retourne des series il faut retrouver 
les episodes
+                # Playlist return TV Shows - Need to get episodes
                 _json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", 
"method": "VideoLibrary.GetEpisodes", "params": { "tvshowid": %s, "properties": 
["title", "playcount", "season", "episode", "showtitle", "plot", "file", 
"rating", "resume", "tvshowid", "art", "streamdetails", "dateadded"] }, "id": 
1}' %(_file['id']))
                 _json_query = unicode(_json_query, 'utf-8', errors='ignore')
-                #log(_json_query)
                 _json_response = simplejson.loads(_json_query)
                 _episodes = _json_response.get( "result", {} ).get( "episodes" 
)
                 if _episodes:
@@ -236,8 +234,9 @@ def _getEpisodesFromPlaylist ( ):
                         if xbmc.abortRequested:
                             break
                         # Add TV Show fanart and thumbnail for each episode
-                        #_episode["tvshowid"]=_file['id']
                         art = _episode['art']
+                        # Add episode ID when playlist type is TVShow
+                        _episode["id"]=_episode['episodeid']
                         _episode["tvshowfanart"]=art.get('tvshow.fanart')
                         _episode["tvshowthumb"]=art.get('thumb')
                         _total, _watched, _unwatched, _result = 
_watchedOrResume ( _total, _watched, _unwatched, _result, _episode )
@@ -249,7 +248,7 @@ def _getEpisodesFromPlaylist ( ):
                 if _id not in _tvshowid:
                     _tvshows += 1
                     _tvshowid.append(_id)
-                # La playlist fournie retourne des episodes
+                # Playlist return TV Shows - Nothing else to do
                 _total, _watched, _unwatched, _result = _watchedOrResume ( 
_total, _watched, _unwatched, _result, _file )
         _setVideoProperties ( _total, _watched, _unwatched )
         _setTvShowsProperties ( _tvshows )
@@ -304,6 +303,8 @@ def _getEpisodes ( ):
             if _id not in _tvshowid:
                 _tvshows += 1
                 _tvshowid.append(_id)
+            # Add episode ID
+            _item["id"]=_item['episodeid']
             _total, _watched, _unwatched, _result = _watchedOrResume ( _total, 
_watched, _unwatched, _result, _item )
         _setVideoProperties ( _total, _watched, _unwatched )
         _setTvShowsProperties ( _tvshows )
@@ -486,7 +487,6 @@ def _setEpisodeProperties ( _episode, _count ):
             played = '0%'
         art = _episode['art']
         path = media_path(_episode['file'])
-        #log(_episode['streamdetails'])
         play = 'XBMC.RunScript(' + __addonid__ + ',episodeid=' + 
str(_episode.get('id')) + ')'
         streaminfo = 
media_streamdetails(_episode['file'].encode('utf-8').lower(),
                                          _episode['streamdetails'])

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

Summary of changes:
 script.randomandlastitems/addon.xml             |    2 +-
 script.randomandlastitems/changelog.txt         |    3 +++
 script.randomandlastitems/randomandlastitems.py |   12 ++++++------
 3 files changed, 10 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to