The branch, eden-pre has been updated
via 555cdda010413b6e461d7b60ddb7f41b6e66c63d (commit)
from 55daab19724b5603d1ca241af58ab91a9ce71e80 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=555cdda010413b6e461d7b60ddb7f41b6e66c63d
commit 555cdda010413b6e461d7b60ddb7f41b6e66c63d
Author: ronie <[email protected]>
Date: Tue Sep 20 22:05:54 2011 +0200
[script.globalsearch] -v0.1.1
several fixed due to json-rpc changes and more...
diff --git a/script.globalsearch/addon.xml b/script.globalsearch/addon.xml
index 97e2c4a..fbd8ac0 100644
--- a/script.globalsearch/addon.xml
+++ b/script.globalsearch/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.globalsearch" name="Global Search" version="0.1.0"
provider-name="ronie">
+<addon id="script.globalsearch" name="Global Search" version="0.1.1"
provider-name="ronie">
<requires>
<import addon="xbmc.python" version="2.0"/>
</requires>
diff --git a/script.globalsearch/changelog.txt
b/script.globalsearch/changelog.txt
index 632fa45..4e7d228 100644
--- a/script.globalsearch/changelog.txt
+++ b/script.globalsearch/changelog.txt
@@ -1,3 +1,7 @@
+v0.1.1
+- adjusted to latest json-rpc changes
+- fixed fetching of streamdetails
+
v0.1.0
- initial release
diff --git a/script.globalsearch/resources/lib/gui.py
b/script.globalsearch/resources/lib/gui.py
index 87ce138..0d2964a 100644
--- a/script.globalsearch/resources/lib/gui.py
+++ b/script.globalsearch/resources/lib/gui.py
@@ -115,7 +115,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitems = []
self.getControl( 191 ).setLabel( '[B]' + xbmc.getLocalizedString(342)
+ '[/B]' )
count = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"fields": ["streamDetails", "genre",
"studio", "year", "tagline", "plot", "plotoutline", "runtime", "fanart",
"thumbnail", "file", "trailer", "playcount", "rating", "mpaa", "director",
"writer"], "sort": { "method": "label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMovies", "params": {"properties": ["streamdetails", "genre",
"studio", "year", "tagline", "plot", "plotoutline", "runtime", "fanart",
"thumbnail", "file", "trailer", "playcount", "rating", "mpaa", "director",
"writer"], "sort": { "method": "label" } }, "id": 1}')
json_temp =
json_query.replace('}]}','').replace('}]','').replace('"}','"').replace('\n\t\t\t\t\t\t}','').replace('}\n\t\t\t\t\t]\n\t\t\t\t}','').replace(']\n\t\t\t\t}','')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_temp)
for movieitem in json_response:
@@ -290,7 +290,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitems = []
self.getControl( 191 ).setLabel( '[B]' +
xbmc.getLocalizedString(20343) + '[/B]' )
count = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"fields": ["genre", "studio",
"premiered", "plot", "fanart", "thumbnail", "file", "playcount", "year",
"mpaa", "episode", "rating"], "sort": { "method": "label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetTVShows", "params": {"properties": ["genre", "studio",
"premiered", "plot", "fanart", "thumbnail", "playcount", "year", "mpaa",
"episode", "rating"], "sort": { "method": "label" } }, "id": 1}')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
for tvshowitem in json_response:
findtvshowname = re.search( '"label": ?"(.*?)",["\n]', tvshowitem )
@@ -389,7 +389,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitems = []
self.getControl( 191 ).setLabel( '[B]' +
xbmc.getLocalizedString(20343) + '[/B]' )
count = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetSeasons", "params": {"fields": ["showtitle", "season",
"fanart", "thumbnail", "playcount", "episode"], "sort": { "method": "label" },
"tvshowid":%s }, "id": 1}' % self.tvshowid)
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetSeasons", "params": {"properties": ["showtitle", "season",
"fanart", "thumbnail", "playcount", "episode"], "sort": { "method": "label" },
"tvshowid":%s }, "id": 1}' % self.tvshowid)
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
for seasonitem in json_response:
findtvshowname = re.search( '"showtitle": ?"(.*?)",["\n]',
seasonitem )
@@ -452,9 +452,9 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( 191 ).setLabel( '[B]' +
xbmc.getLocalizedString(20360) + '[/B]' )
count = 0
if self.fetch_seasonepisodes == 'true':
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": { "fields": ["streamDetails", "plot",
"firstaired", "runtime", "season", "episode", "showtitle", "thumbnail",
"fanart", "file", "playcount", "director", "rating"], "sort": { "method":
"label" }, "tvshowid":%s }, "id": 1}' % self.tvshowid)
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": { "properties": ["streamdetails", "plot",
"firstaired", "runtime", "season", "episode", "showtitle", "thumbnail",
"fanart", "file", "playcount", "director", "rating"], "sort": { "method":
"label" }, "tvshowid":%s }, "id": 1}' % self.tvshowid)
else:
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": { "fields": ["streamDetails", "plot",
"firstaired", "runtime", "season", "episode", "showtitle", "thumbnail",
"fanart", "file", "playcount", "director", "rating"], "sort": { "method":
"label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetEpisodes", "params": { "properties": ["streamdetails", "plot",
"firstaired", "runtime", "season", "episode", "showtitle", "thumbnail",
"fanart", "file", "playcount", "director", "rating"], "sort": { "method":
"label" } }, "id": 1}')
json_temp =
json_query.replace('}]}','').replace('}],"v',',"v').replace('\n\t\t\t\t\t\t}','').replace('}\n\t\t\t\t\t]\n\t\t\t\t}','').replace(']\n\t\t\t\t}','')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_temp)
for episodeitem in json_response:
@@ -618,7 +618,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitems = []
self.getControl( 191 ).setLabel( '[B]' +
xbmc.getLocalizedString(20389) + '[/B]' )
count = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"fields": ["streamDetails",
"runtime", "genre", "studio", "artist", "album", "year", "plot", "fanart",
"thumbnail", "file", "playcount", "director"], "sort": { "method": "label" } },
"id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"VideoLibrary.GetMusicVideos", "params": {"properties": ["streamdetails",
"runtime", "genre", "studio", "artist", "album", "year", "plot", "fanart",
"thumbnail", "file", "playcount", "director"], "sort": { "method": "label" } },
"id": 1}')
json_temp =
json_query.replace('}]}','').replace('}]','').replace('"}','"').replace('\n\t\t\t\t\t\t}','').replace('}\n\t\t\t\t\t]\n\t\t\t\t}','').replace(']\n\t\t\t\t}','')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_temp)
for musicvideoitem in json_response:
@@ -771,7 +771,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
listitems = []
self.getControl( 191 ).setLabel( '[B]' + xbmc.getLocalizedString(133)
+ '[/B]' )
count = 0
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetArtists", "params": {"fields": ["genre", "description",
"fanart", "thumbnail", "formed", "disbanded", "born", "yearsactive", "died",
"mood", "style"], "sort": { "method": "label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetArtists", "params": {"properties": ["genre", "description",
"fanart", "thumbnail", "formed", "disbanded", "born", "yearsactive", "died",
"mood", "style"], "sort": { "method": "label" } }, "id": 1}')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
for artistitem in json_response:
findartistname = re.search( '"artist": ?"(.*?)",["\n]', artistitem
)
@@ -870,9 +870,10 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( 191 ).setLabel( '[B]' + xbmc.getLocalizedString(132)
+ '[/B]' )
count = 0
if self.fetch_albumssongs == 'true':
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"fields": ["description", "label",
"artist", "genre", "year", "thumbnail", "fanart", "theme", "type", "mood",
"style", "rating"], "sort": { "method": "label" }, "artistid":%s }, "id": 1}' %
self.artistid)
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"properties": ["description",
"albumlabel", "artist", "genre", "year", "thumbnail", "fanart", "theme",
"type", "mood", "style", "rating"z], "sort": { "method": "label" },
"artistid":%s }, "id": 1}' % self.artistid)
else:
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"fields": ["description", "label",
"artist", "genre", "year", "thumbnail", "fanart", "theme", "type", "mood",
"style", "rating"], "sort": { "method": "label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"properties": ["description",
"albumlabel", "artist", "genre", "year", "thumbnail", "fanart", "theme",
"type", "mood", "style", "rating"], "sort": { "method": "label" } }, "id": 1}')
+ log('BUG %s' % json_query)
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
for albumitem in json_response:
if self.fetch_albumssongs == 'true':
@@ -910,7 +911,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
path = 'musicdb://3/' + path + '/'
else:
path = ""
- findlabel = re.search( '"album_label": ?"(.*?)",["\n]',
albumitem )
+ findlabel = re.search( '"albumlabel": ?"(.*?)",["\n]',
albumitem )
if findlabel:
label = (findlabel.group(1))
else:
@@ -998,9 +999,9 @@ class GUI( xbmcgui.WindowXMLDialog ):
self.getControl( 191 ).setLabel( '[B]' + xbmc.getLocalizedString(134)
+ '[/B]' )
count = 0
if self.fetch_albumssongs == 'true':
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"fields": ["artist", "album", "genre",
"duration", "year", "file", "thumbnail", "fanart", "comment", "rating",
"track", "playcount"], "sort": { "method": "label" }, "artistid":%s }, "id":
1}' % self.artistid)
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"properties": ["artist", "album", "genre",
"duration", "year", "file", "thumbnail", "fanart", "comment", "rating",
"track", "playcount"], "sort": { "method": "label" }, "artistid":%s }, "id":
1}' % self.artistid)
else:
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"fields": ["artist", "album", "genre",
"duration", "year", "file", "thumbnail", "fanart", "comment", "rating",
"track", "playcount"], "sort": { "method": "label" } }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"properties": ["artist", "album", "genre",
"duration", "year", "file", "thumbnail", "fanart", "comment", "rating",
"track", "playcount"], "sort": { "method": "label" } }, "id": 1}')
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
for songitem in json_response:
if self.fetch_albumssongs == 'true':
@@ -1174,7 +1175,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
def _play_album( self ):
self._close()
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"fields": ["file", "fanart"], "sort": {
"method": "track" }, "albumid":%s }, "id": 1}' % self.albumid)
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetSongs", "params": {"properties": ["file", "fanart"], "sort": {
"method": "track" }, "albumid":%s }, "id": 1}' % self.albumid)
json_response = re.compile( "{(.*?)}", re.DOTALL ).findall(json_query)
playlist = xbmc.PlayList(0)
playlist.clear()
-----------------------------------------------------------------------
Summary of changes:
script.globalsearch/addon.xml | 2 +-
script.globalsearch/changelog.txt | 4 ++++
script.globalsearch/resources/lib/gui.py | 27 ++++++++++++++-------------
3 files changed, 19 insertions(+), 14 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons