The branch, gotham has been updated
       via  433fab8fab96550b48dd014708f63f7cec5e7b79 (commit)
       via  c6666a85f155aa19cc343d7ceeac5738d67f7b67 (commit)
      from  acc7e36d312d2bc3bd1d8439417d520b72316960 (commit)

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

commit 433fab8fab96550b48dd014708f63f7cec5e7b79
Author: Martijn Kaijser <[email protected]>
Date:   Tue Aug 5 17:33:04 2014 +0200

    [service.subtitles.subscene] 1.0.3

diff --git a/service.subtitles.subscene/addon.xml 
b/service.subtitles.subscene/addon.xml
index eb5df75..363f88d 100755
--- a/service.subtitles.subscene/addon.xml
+++ b/service.subtitles.subscene/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.subscene"
        name="Subscene.com"
-       version="1.0.2"
+       version="1.0.3"
        provider-name="CrowleyAJ">
     <requires>
         <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.subscene/changelog.txt 
b/service.subtitles.subscene/changelog.txt
index 564d9d6..a8b7c52 100644
--- a/service.subtitles.subscene/changelog.txt
+++ b/service.subtitles.subscene/changelog.txt
@@ -1,3 +1,6 @@
+1.0.3
+- fixed an issue where no number of files were given on subscene results page
+
 1.0.2
 - now correctly identifies Persian language
 
diff --git a/service.subtitles.subscene/service.py 
b/service.subtitles.subscene/service.py
index c12c420..746f1ea 100644
--- a/service.subtitles.subscene/service.py
+++ b/service.subtitles.subscene/service.py
@@ -117,12 +117,15 @@ def getallsubs(content, allowed_languages, filename="", 
search_string=""):
                         "<span class=\"[^\"]+ 
(?P<quality>\w+-icon)\">\s+(?P<language>[^\r\n\t]+)\s+</span>\s+"
                         "<span>\s+(?P<filename>[^\r\n\t]+)\s+</span>\s+"
                         "</a>\s+</td>\s+"
-                        "<td 
class=\"[^\"]+\">\s+(?P<numfiles>[^\r\n\t]+)\s+</td>\s+"
+                        "<td 
class=\"[^\"]+\">\s+(?P<numfiles>[^\r\n\t]*)\s+</td>\s+"
                         "<td class=\"(?P<hiclass>[^\"]+)\">")
 
     subtitles = []
 
     for matches in re.finditer(subtitle_pattern, content, re.IGNORECASE | 
re.DOTALL):
+        numfiles = 1
+        if matches.group('numfiles') != "":
+            numfiles = int(matches.group('numfiles'))
         languagefound = matches.group('language')
         language_info = get_language_info(languagefound)
 
@@ -144,7 +147,7 @@ def getallsubs(content, allowed_languages, filename="", 
search_string=""):
                 if string.find(string.lower(subtitle_name), 
string.lower(search_string)) > -1:
                     subtitles.append({'rating': rating, 'filename': 
subtitle_name, 'sync': sync, 'link': link,
                                      'lang': language_info, 'hearing_imp': 
hearing_imp})
-                elif int(matches.group('numfiles')) > 2:
+                elif numfiles > 2:
                     subtitle_name = subtitle_name + ' ' + (__language__(32001) 
% int(matches.group('numfiles')))
                     subtitles.append({'rating': rating, 'filename': 
subtitle_name, 'sync': sync, 'link': link,
                                      'lang': language_info, 'hearing_imp': 
hearing_imp, 'find': search_string})

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

commit c6666a85f155aa19cc343d7ceeac5738d67f7b67
Author: Martijn Kaijser <[email protected]>
Date:   Tue Aug 5 17:32:10 2014 +0200

    [service.library.data.provider] 0.0.5

diff --git a/service.library.data.provider/README.md 
b/service.library.data.provider/README.md
index 2adc72d..120776e 100644
--- a/service.library.data.provider/README.md
+++ b/service.library.data.provider/README.md
@@ -15,7 +15,7 @@ Load a list with this content tag to have the list use cached 
data automatically
 <content 
target="video">plugin://service.library.data.provider?type=randommovies&amp;reload=$INFO[Window.Property(randommovies)]</content>
 
 To view within the library, create a link omitting the reload parameter:
-<onclick>ActivateWindow(Videos,plugin://service.library.data.provider?type=randommovies,return</onclick>
+<onclick>ActivateWindow(Videos,plugin://service.library.data.provider?type=randommovies,return)</onclick>
 
 Available tags:
 -   randommovies
@@ -24,6 +24,7 @@ Available tags:
 -   recommendedepisodes
 -   recentepisodes
 -   randomepisodes
+-   recentvideos (movies and episodes)
 -   randomsongs
 -   randomalbums
 -   recentalbums
@@ -33,6 +34,9 @@ Available infolabels:
 Most of the usual video library infolabels. 
 ListItem.Property(type) shows with what option the script was run.
 
+Limiting results:
+To only return partial results, add the parameter "limit", for example limit=5.
+
 TODO:
 Artist/Musicvideo/Addons support.
 
diff --git a/service.library.data.provider/addon.xml 
b/service.library.data.provider/addon.xml
index 9b14cca..83769ac 100644
--- a/service.library.data.provider/addon.xml
+++ b/service.library.data.provider/addon.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id="service.library.data.provider" name="Library Data Provider" 
provider-name="BigNoid, Unfledged, Martijn" version="0.0.4">
+<addon id="service.library.data.provider" name="Library Data Provider" 
provider-name="BigNoid, Unfledged, Martijn" version="0.0.5">
        <requires>
                <import addon="xbmc.addon" version="12.0.0"/>
                <import addon="xbmc.json" version="6.0.0"/>
diff --git a/service.library.data.provider/default.py 
b/service.library.data.provider/default.py
index 5128949..088af82 100644
--- a/service.library.data.provider/default.py
+++ b/service.library.data.provider/default.py
@@ -55,55 +55,80 @@ class Main:
     def __init__(self):
         self._parse_argv()
         self.WINDOW = xbmcgui.Window(10000)
+        self.SETTINGSLIMIT = int(__addon__.getSetting("limit"))
+        
+        full_liz = list()
         
         if self.TYPE == "randommovies":
-            self.parse_movies( 'randommovies', 32004 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'movies')
+            self.parse_movies( 'randommovies', 32004, full_liz )
         elif self.TYPE == "recentmovies":
-            self.parse_movies( 'recentmovies', 32005 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'movies')
+            self.parse_movies( 'recentmovies', 32005, full_liz )
         elif self.TYPE == "recommendedmovies":
-            self.parse_movies( 'recommendedmovies', 32006 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'movies')
+            self.parse_movies( 'recommendedmovies', 32006, full_liz )
         elif self.TYPE == "recommendedepisodes":
-            self.parse_tvshows_recommended( 'recommendedepisodes', 32010 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
+            self.parse_tvshows_recommended( 'recommendedepisodes', 32010, 
full_liz )
         elif self.TYPE == "recentepisodes":
-            self.parse_tvshows( 'recentepisodes', 32008 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
+            self.parse_tvshows( 'recentepisodes', 32008, full_liz )
         elif self.TYPE == "randomepisodes":
-            self.parse_tvshows( 'randomepisodes', 32007 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
+            self.parse_tvshows( 'randomepisodes', 32007, full_liz )
+        elif self.TYPE == "recentvideos" :
+            listA = []
+            listB = []
+            dateListA = []
+            dateListB = []
+            self.parse_movies( 'recentmovies', 32005, listA, dateListA, 
"dateadded" )
+            self.parse_tvshows( 'recentepisodes', 32008, listB, dateListB, 
"dateadded" )
+            full_liz = self._combine_by_date( listA, dateListA, listB, 
dateListB )
         elif self.TYPE == "randomalbums":
-            self.parse_albums( 'randomalbums', 32016 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'albums')
+            self.parse_albums( 'randomalbums', 32016, full_liz )
         elif self.TYPE == "recentalbums":
-            self.parse_albums( 'recentalbums', 32017 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'albums')
+            self.parse_albums( 'recentalbums', 32017, full_liz )
         elif self.TYPE == "recommendedalbums":
-            self.parse_albums( 'recommendedalbums', 32018 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'albums')
+            self.parse_albums( 'recommendedalbums', 32018, full_liz )
         elif self.TYPE == "randomsongs":
-            self.parse_song( 'randomsongs', 32015 )
+            xbmcplugin.setContent(int(sys.argv[1]), 'songs')
+            self.parse_song( 'randomsongs', 32015, full_liz )
             
         # Play an albums
         elif self.TYPE == "play_album":
             self.play_album( self.ALBUM )
+            return
             
         if not self.TYPE:
             # Show a root menu
             full_liz = list()
-            items = [[32004, "randommovies"], [32005, "recentmovies"], [32006, 
"recommendedmovies"], [32007, "randomepisodes"], [32008, "recentepisodes"], 
[32010, "recommendedepisodes"], [32016, "randomalbums"], [32017, 
"recentalbums"], [32018, "recommendedalbums"], [32015, "randomsongs"]]
+            items = [[32004, "randommovies"], [32005, "recentmovies"], [32006, 
"recommendedmovies"], [32007, "randomepisodes"], [32008, "recentepisodes"], 
[32010, "recommendedepisodes"], [32019, "recentvideos"], [32016, 
"randomalbums"], [32017, "recentalbums"], [32018, "recommendedalbums"], [32015, 
"randomsongs"]]
             for item in items:
                 liz = xbmcgui.ListItem( __localize__( item[0] ) )
                 liz.setIconImage( "DefaultFolder.png" )
                 full_liz.append( ( 
"plugin://service.library.data.provider?type=" + item[1], liz, True ) )
 
-            xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-            xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+        xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
+        xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
                 
             
     def _init_vars(self):
         self.WINDOW = xbmcgui.Window(10000)
         
-    def parse_movies(self, request, list_type):
+    def parse_movies(self, request, list_type, full_liz, date_liz = None, 
date_type = None):
         json_query = self._get_data( request )
+        while json_query == "LOADING":
+            xbmc.sleep( 100 )
+            json_query = self._get_data( request )
+
+        count = 0
         if json_query:
             json_query = simplejson.loads(json_query)
             if json_query.has_key('result') and 
json_query['result'].has_key('movies'):
-                xbmcplugin.setContent(int(sys.argv[1]), 'movies')
-                full_liz = list()
                 for item in json_query['result']['movies']:
                     watched = False
                     if item['playcount'] >= 1:
@@ -120,6 +145,9 @@ class Main:
                         country = item['country'][0]
                     else:
                         country = ""
+                    if "cast" in item:
+                        cast = self._get_cast( item['cast'] )
+                    
                     # create a list item
                     liz = xbmcgui.ListItem(item['title'])
                     liz.setInfo( type="Video", infoLabels={ "Title": 
item['title'] })
@@ -135,6 +163,11 @@ class Main:
                     liz.setInfo( type="Video", infoLabels={ "Votes": 
item['votes'] })
                     liz.setInfo( type="Video", infoLabels={ "MPAA": 
item['mpaa'] })
                     liz.setInfo( type="Video", infoLabels={ "Director": " / 
".join(item['director']) })
+                    if "writer" in item:
+                        liz.setInfo( type="Video", infoLabels={ "Writer": " / 
".join(item['writer']) })
+                    if "cast" in item:
+                        liz.setInfo( type="Video", infoLabels={ "Cast": 
cast[0] })
+                        liz.setInfo( type="Video", infoLabels={ "CastAndRole": 
cast[1] })
                     liz.setInfo( type="Video", infoLabels={ "Trailer": 
item['trailer'] })
                     liz.setInfo( type="Video", infoLabels={ "Playcount": 
item['playcount'] })
                     liz.setProperty("resumetime", 
str(item['resume']['position']))
@@ -149,24 +182,29 @@ class Main:
                         for stream in value:
                             liz.addStreamInfo( key, stream ) 
                     full_liz.append((item['file'], liz, False))
-                xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-                xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+                    
+                    if date_type is not None:
+                        date_liz.append( item[date_type] )
+                    
+                    count += 1
+                    if count == self.LIMIT:
+                        break
+            
             del json_query
         
-    def parse_tvshows_recommended(self, request, list_type):
+    def parse_tvshows_recommended(self, request, list_type, full_liz, date_liz 
= None, date_type = None):
         json_query = self._get_data( request )
+        while json_query == "LOADING":
+            xbmc.sleep( 100 )
+            json_query = self._get_data( request )
         if json_query:
             # First unplayed episode of recent played tvshows
             json_query = simplejson.loads(json_query)
             if json_query.has_key('result') and 
json_query['result'].has_key('tvshows'):
-                xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
-                full_liz = list()
                 count = 0
                 for item in json_query['result']['tvshows']:
                     if xbmc.abortRequested:
                         break
-                    count += 1
-                    #json_query2 = self.load_file( str( item['tvshowid'] ) )
                     json_query2 = self.WINDOW.getProperty( 
"recommendedepisodes-data-" + str( item['tvshowid'] ) )
                     if json_query:
                         json_query2 = simplejson.loads(json_query2)
@@ -187,6 +225,9 @@ class Main:
                             studio = item['studio'][0]
                         else:
                             studio = ""
+                        if "cast" in item2:
+                            cast = self._get_cast( item2['cast'] )
+                        
                         liz = xbmcgui.ListItem(item2['title'])
                         liz.setInfo( type="Video", infoLabels={ "Title": 
item2['title'] })
                         liz.setInfo( type="Video", infoLabels={ "Episode": 
item2['episode'] })
@@ -198,6 +239,11 @@ class Main:
                         liz.setInfo( type="Video", infoLabels={ "Rating": 
str(round(float(item2['rating']),1)) })
                         liz.setInfo( type="Video", infoLabels={ "MPAA": 
item['mpaa'] })
                         liz.setInfo( type="Video", infoLabels={ "Playcount": 
item2['playcount'] })
+                        if "writer" in item2:
+                            liz.setInfo( type="Video", infoLabels={ "Writer": 
" / ".join(item2['writer']) })
+                        if "cast" in item2:
+                            liz.setInfo( type="Video", infoLabels={ "Cast": 
cast[0] })
+                            liz.setInfo( type="Video", infoLabels={ 
"CastAndRole": cast[1] })
                         liz.setProperty("episodeno", episodeno)
                         liz.setProperty("resumetime", 
str(item2['resume']['position']))
                         liz.setProperty("totaltime", 
str(item2['resume']['total']))
@@ -211,18 +257,26 @@ class Main:
                                 liz.addStreamInfo( key, stream ) 
                         
                         full_liz.append((item2['file'], liz, False))
-                xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-                xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+                        
+                        if date_type is not None:
+                            date_liz.append( item[date_type] )
+                        
+                        count += 1
+                        if count == self.LIMIT:
+                            break
+                    if count == self.LIMIT:
+                        break
             del json_query
 
-    def parse_tvshows(self, request, list_type):
-        #json_query = unicode(self.WINDOW.getProperty( request + '-data' ) , 
'utf-8', errors='ignore')
+    def parse_tvshows(self, request, list_type, full_liz, date_liz = None, 
date_type = None):
         json_query = self._get_data( request )
+        while json_query == "LOADING":
+            xbmc.sleep( 100 )
+            json_query = self._get_data( request )
         if json_query:
             json_query = simplejson.loads(json_query)
             if json_query.has_key('result') and 
json_query['result'].has_key('episodes'):
-                xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
-                full_liz = list()
+                count = 0
                 for item in json_query['result']['episodes']:
                     episode = "%.2d" % float(item['episode'])
                     season = "%.2d" % float(item['season'])
@@ -234,6 +288,9 @@ class Main:
                         plot = __localize__(32014)
                     else:
                         plot = item['plot']
+                    if "cast" in item:
+                        cast = self._get_cast( item['cast'] )
+                    
                     liz = xbmcgui.ListItem(item['title'])
                     liz.setInfo( type="Video", infoLabels={ "Title": 
item['title'] })
                     liz.setInfo( type="Video", infoLabels={ "Episode": 
item['episode'] })
@@ -245,6 +302,11 @@ class Main:
                     liz.setInfo( type="Video", infoLabels={ "Rating": 
str(round(float(item['rating']),1)) })
                     #liz.setInfo( type="Video", infoLabels={ "MPAA": 
item['mpaa'] })
                     liz.setInfo( type="Video", infoLabels={ "Playcount": 
item['playcount'] })
+                    if "writer" in item:
+                        liz.setInfo( type="Video", infoLabels={ "Writer": " / 
".join(item['writer']) })
+                    if "cast" in item:
+                        liz.setInfo( type="Video", infoLabels={ "Cast": 
cast[0] })
+                        liz.setInfo( type="Video", infoLabels={ "CastAndRole": 
cast[1] })
                     liz.setProperty("episodeno", episodeno)
                     liz.setProperty("resumetime", 
str(item['resume']['position']))
                     liz.setProperty("totaltime", str(item['resume']['total']))
@@ -257,18 +319,25 @@ class Main:
                         for stream in value:
                             liz.addStreamInfo( key, stream ) 
                     full_liz.append((item['file'], liz, False))
-                xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-                xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+                    
+                    if date_type is not None:
+                        date_liz.append( item[date_type] )
+                    
+                    count += 1
+                    if count == self.LIMIT:
+                        break
             del json_query
-        
-    def parse_song(self, request, list_type):
+
+    def parse_song(self, request, list_type, full_liz, date_liz = None, 
date_type = None):
         json_query = self._get_data( request )
+        while json_query == "LOADING":
+            xbmc.sleep( 100 )
+            json_query = self._get_data( request )
+        
         if json_query:
-            json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"AudioLibrary.GetSongs", "params": {"properties": ["title", "playcount", 
"genre", "artist", "album", "year", "file", "thumbnail", "fanart", "rating"], 
"filter": {"field": "playcount", "operator": "lessthan", "value": "1"}, 
"limits": {"end": %d},' %self.LIMIT
             json_query = simplejson.loads(json_query)
+            count = 0
             if json_query.has_key('result') and 
json_query['result'].has_key('songs'):
-                xbmcplugin.setContent(int(sys.argv[1]), 'songs')
-                full_liz = list()
                 for item in json_query['result']['songs']:
                     liz = xbmcgui.ListItem(item['title'])
                     liz.setInfo( type="Music", infoLabels={ "Title": 
item['title'] })
@@ -284,17 +353,25 @@ class Main:
                     liz.setProperty("fanart_image", item['fanart'])
 
                     full_liz.append((item['file'], liz, False))
-                xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-                xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+                    
+                    if date_type is not None:
+                        date_liz.append( item[date_type] )
+                    
+                    count += 1
+                    if count == self.LIMIT:
+                        break
             del json_query
         
-    def parse_albums (self, request, list_type):
+    def parse_albums (self, request, list_type, full_liz, date_liz = None, 
date_type = None):
         json_query = self._get_data( request )
+        while json_query == "LOADING":
+            xbmc.sleep( 100 )
+            json_query = self._get_data( request )
+
         if json_query:
             json_query = simplejson.loads(json_query)
             if json_query.has_key('result') and 
json_query['result'].has_key('albums'):
-                xbmcplugin.setContent(int(sys.argv[1]), 'albums')
-                full_liz = list()
+                count = 0
                 for item in json_query['result']['albums']:
                     rating = str(item['rating'])
                     if rating == '48':
@@ -320,9 +397,13 @@ class Main:
                     # Path will call plugin again, with the album id
                     path = sys.argv[0] + "?type=play_album&album=" + 
str(item['albumid'])
                     
+                    if date_type is not None:
+                        date_liz.append( item[date_type] )
+                                        
                     full_liz.append((path, liz, False))
-                xbmcplugin.addDirectoryItems(int(sys.argv[1]),full_liz)
-                xbmcplugin.endOfDirectory(handle= int(sys.argv[1]))
+                    count += 1
+                    if count == self.LIMIT:
+                        break
             del json_query
         
     def play_album( self, album ):
@@ -330,6 +411,40 @@ class Main:
         # Return ResolvedUrl as failed, as we've taken care of what to play
         xbmcplugin.setResolvedUrl( handle=int( sys.argv[1]), succeeded=False, 
listitem=xbmcgui.ListItem() )
         
+    def _get_cast( self, castData ):
+        listCast = []
+        listCastAndRole = []
+        for castmember in castData:
+            listCast.append( castmember["name"] )
+            listCastAndRole.append( (castmember["name"], castmember["role"]) ) 
+        return [listCast, listCastAndRole]
+        
+    def _combine_by_date( self, liz_a, date_a, liz_b, date_b ):
+        count = 0
+        full_liz = liz_a[:]
+
+        for itemIndex, itemDate in enumerate( date_b ):
+            added = False
+            for compareIndex, compareDate in enumerate( date_a ):
+                if compareIndex < count or count > self.SETTINGSLIMIT:
+                    continue
+                if itemDate > compareDate:
+                    full_liz.insert( count, liz_b[itemIndex] )
+                    date_a.insert( count, itemDate )
+                    added = True
+                    break
+                count += 1
+            if added == False and count < self.SETTINGSLIMIT:
+                full_liz.append( liz_b[-1] )
+                date_a.append( date_b[-1] )
+                    
+        # Limit the results
+        if self.LIMIT is not -1:
+            full_liz = full_liz[:self.LIMIT]
+        full_liz = full_liz[:self.SETTINGSLIMIT]
+            
+        return full_liz
+        
     def _get_data( self, request ):
         if request == "randommovies":
             return LIBRARY._fetch_random_movies( self.USECACHE )
@@ -364,7 +479,8 @@ class Main:
         self.ALBUM = params.get( "album", "" )
         self.USECACHE = params.get( "reload", False )
         if self.USECACHE is not False:
-            self.USECACHE == True
+            self.USECACHE = True
+        self.LIMIT = int( params.get( "limit", "-1" ) )
         global PLOT_ENABLE 
         PLOT_ENABLE = __addon__.getSetting("plot_enable")  == 'true'
         self.RANDOMITEMS_UNPLAYED = 
__addon__.getSetting("randomitems_unplayed")  == 'true'
diff --git a/service.library.data.provider/library.py 
b/service.library.data.provider/library.py
index 46792df..9f83823 100644
--- a/service.library.data.provider/library.py
+++ b/service.library.data.provider/library.py
@@ -38,10 +38,6 @@ __addon__        = xbmcaddon.Addon()
 
 PLOT_ENABLE = True
 
-def log(txt):
-    message = '%s: %s' % (__addonname__, txt.encode('ascii', 'ignore'))
-    xbmc.log(msg=message, level=xbmc.LOGDEBUG)
-
 class LibraryFunctions():
     def __init__(self):
         self.WINDOW = xbmcgui.Window(10000)
@@ -78,7 +74,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "randommovies-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director"], "limits": {"end": %d},' % 
self.LIMIT
+        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director", "writer", "cast", "dateadded"], 
"limits": {"end": %d},' % self.LIMIT
         if self.RANDOMITEMS_UNPLAYED:
             json_query = xbmc.executeJSONRPC('%s "sort": {"method": "random" 
}, "filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}}' 
%json_string)
         else:
@@ -98,7 +94,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "randomepisodes-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime"], "limits": {"end": 
%d},' %self.LIMIT
+        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime", "writer", "cast", 
"dateadded", "lastplayed"], "limits": {"end": %d},' %self.LIMIT
         if self.RANDOMITEMS_UNPLAYED:
             json_query = xbmc.executeJSONRPC('%s "sort": {"method": "random" 
}, "filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}}' 
%json_string)
         else:
@@ -118,7 +114,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "randomsongs-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"AudioLibrary.GetSongs", "params": {"properties": ["title", "playcount", 
"genre", "artist", "album", "year", "file", "thumbnail", "fanart", "rating"], 
"filter": {"field": "playcount", "operator": "lessthan", "value": "1"}, 
"limits": {"end": %d},' %self.LIMIT
+        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"AudioLibrary.GetSongs", "params": {"properties": ["title", "playcount", 
"genre", "artist", "album", "year", "file", "thumbnail", "fanart", "rating", 
"lastplayed"], "filter": {"field": "playcount", "operator": "lessthan", 
"value": "1"}, "limits": {"end": %d},' %self.LIMIT
         if self.RANDOMITEMS_UNPLAYED == "True":
             json_query = xbmc.executeJSONRPC('%s "sort": {"method": "random"}, 
"filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}}'  
%json_string)
         else:
@@ -156,7 +152,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "recentmovies-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director"], "limits": {"end": %d},' % 
self.LIMIT
+        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director", "writer", "cast", "dateadded"], 
"limits": {"end": %d},' % self.LIMIT
         if self.RECENTITEMS_UNPLAYED:
             json_query = xbmc.executeJSONRPC('%s "sort": {"order": 
"descending", "method": "dateadded"}, "filter": {"field": "playcount", 
"operator": "is", "value": "0"}}}' %json_string)
         else:
@@ -165,6 +161,7 @@ class LibraryFunctions():
         
         self.WINDOW.setProperty( "recentmovies-data", json_query )
         self.WINDOW.setProperty( "recentmovies",strftime( 
"%Y%m%d%H%M%S",gmtime() ) )
+        self.WINDOW.setProperty( "recentvideos",strftime( 
"%Y%m%d%H%M%S",gmtime() ) )
         
         return json_query
         
@@ -176,7 +173,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "recentepisodes-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime"], "limits": {"end": 
%d},' %self.LIMIT
+        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime", "writer", "cast", 
"dateadded", "lastplayed"], "limits": {"end": %d},' %self.LIMIT
         if self.RECENTITEMS_UNPLAYED:
             json_query = xbmc.executeJSONRPC('%s "sort": {"order": 
"descending", "method": "dateadded"}, "filter": {"field": "playcount", 
"operator": "lessthan", "value": "1"}}}' %json_string)
         else:
@@ -185,6 +182,7 @@ class LibraryFunctions():
         
         self.WINDOW.setProperty( "recentepisodes-data", json_query )
         self.WINDOW.setProperty( "recentepisodes",strftime( 
"%Y%m%d%H%M%S",gmtime() ) )
+        self.WINDOW.setProperty( "recentvideos",strftime( 
"%Y%m%d%H%M%S",gmtime() ) )
         
         return json_query
         
@@ -214,7 +212,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "recommendedmovies-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director"], "limits": {"end": %d},' % 
self.LIMIT
+        json_string = '{"jsonrpc": "2.0",  "id": 1, "method": 
"VideoLibrary.GetMovies", "params": {"properties": ["title", "originaltitle", 
"votes", "playcount", "year", "genre", "studio", "country", "tagline", "plot", 
"runtime", "file", "plotoutline", "lastplayed", "trailer", "rating", "resume", 
"art", "streamdetails", "mpaa", "director", "writer", "cast", "dateadded"], 
"limits": {"end": %d},' % self.LIMIT
         json_query = xbmc.executeJSONRPC('%s "sort": {"order": "descending", 
"method": "lastplayed"}, "filter": {"field": "inprogress", "operator": "true", 
"value": ""}}}' %json_string)
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         
@@ -231,7 +229,7 @@ class LibraryFunctions():
         # Set that we're getting updated data
         self.WINDOW.setProperty( "recommendedepisodes-data", "LOADING" )
         
-        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime"], "limits": {"end": 
%d},' %self.LIMIT
+        json_string = '{"jsonrpc": "2.0", "id": 1, "method": 
"VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", 
"season", "episode", "showtitle", "plot", "file", "rating", "resume", 
"tvshowid", "art", "streamdetails", "firstaired", "runtime", "writer", "cast", 
"dateadded", "lastplayed"], "limits": {"end": %d},' %self.LIMIT
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"VideoLibrary.GetTVShows", "params": {"properties": ["title", "studio", "mpaa", 
"file", "art"], "sort": {"order": "descending", "method": "lastplayed"}, 
"filter": {"field": "inprogress", "operator": "true", "value": ""}, "limits": 
{"end": %d}}, "id": 1}' %self.LIMIT)
         json_query = unicode(json_query, 'utf-8', errors='ignore')
         json_query1 = simplejson.loads(json_query)
@@ -239,7 +237,7 @@ class LibraryFunctions():
             for item in json_query1['result']['tvshows']:
                 if xbmc.abortRequested:
                     break
-                json_query2 = xbmc.executeJSONRPC('{"jsonrpc": "2.0", 
"method": "VideoLibrary.GetEpisodes", "params": {"tvshowid": %d, "properties": 
["title", "playcount", "plot", "season", "episode", "showtitle", "file", 
"lastplayed", "rating", "resume", "art", "streamdetails", "firstaired", 
"runtime"], "sort": {"method": "episode"}, "filter": {"field": "playcount", 
"operator": "is", "value": "0"}, "limits": {"end": 1}}, "id": 1}' 
%item['tvshowid'])
+                json_query2 = xbmc.executeJSONRPC('{"jsonrpc": "2.0", 
"method": "VideoLibrary.GetEpisodes", "params": {"tvshowid": %d, "properties": 
["title", "playcount", "plot", "season", "episode", "showtitle", "file", 
"lastplayed", "rating", "resume", "art", "streamdetails", "firstaired", 
"runtime", "writer", "cast", "dateadded"], "sort": {"method": "episode"}, 
"filter": {"field": "playcount", "operator": "is", "value": "0"}, "limits": 
{"end": 1}}, "id": 1}' %item['tvshowid'])
                 json_query2 = unicode(json_query2, 'utf-8', errors='ignore')
                 self.WINDOW.setProperty( "recommendedepisodes-data-" + 
str(item['tvshowid']), json_query2)
         
diff --git 
a/service.library.data.provider/resources/language/English/strings.po 
b/service.library.data.provider/resources/language/English/strings.po
index c5af846..c4dc05b 100644
--- a/service.library.data.provider/resources/language/English/strings.po
+++ b/service.library.data.provider/resources/language/English/strings.po
@@ -87,3 +87,7 @@ msgstr ""
 msgctxt "#32018"
 msgid "Recommended Albums"
 msgstr ""
+
+msgctxt "#32019"
+msgid "Recent Videos"
+msgstr ""

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

Summary of changes:
 service.library.data.provider/README.md            |    6 +-
 service.library.data.provider/addon.xml            |    2 +-
 service.library.data.provider/changelog.txt        |    4 +
 service.library.data.provider/default.py           |  204 +++++++++++++++-----
 service.library.data.provider/library.py           |   22 +--
 .../resources/language/English/strings.po          |    4 +
 service.subtitles.subscene/addon.xml               |    2 +-
 service.subtitles.subscene/changelog.txt           |    3 +
 service.subtitles.subscene/service.py              |    7 +-
 9 files changed, 193 insertions(+), 61 deletions(-)
 create mode 100644 service.library.data.provider/changelog.txt


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to