The branch, eden has been updated
via 67f4577e7814541f0de4712e502e3b4c1eb17a11 (commit)
from 5aa744f5b820b73e6fa65fdf1dc9811d44aa4e85 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=67f4577e7814541f0de4712e502e3b4c1eb17a11
commit 67f4577e7814541f0de4712e502e3b4c1eb17a11
Author: ronie <[email protected]>
Date: Tue Mar 20 18:03:17 2012 +0100
[script.playalbum] -v0.0.5
use title instead of label
diff --git a/script.playalbum/addon.xml b/script.playalbum/addon.xml
index b40465e..13ac49f 100644
--- a/script.playalbum/addon.xml
+++ b/script.playalbum/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.playalbum" name="Play Album Script" version="0.0.3"
provider-name="ronie">
+<addon id="script.playalbum" name="Play Album Script" version="0.0.5"
provider-name="ronie">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
diff --git a/script.playalbum/changelog.txt b/script.playalbum/changelog.txt
index edf50cb..f3c4f4c 100644
--- a/script.playalbum/changelog.txt
+++ b/script.playalbum/changelog.txt
@@ -1,3 +1,9 @@
+v0.0.5:
+- use title instead of label
+
+v0.0.4:
+- use json if python 2.7 is available
+
v0.0.3:
- use simplejson
- fix fetching album id
diff --git a/script.playalbum/default.py b/script.playalbum/default.py
index bee1e63..1ba8ddf 100644
--- a/script.playalbum/default.py
+++ b/script.playalbum/default.py
@@ -1,6 +1,9 @@
import sys
-import simplejson
import xbmc, xbmcgui, xbmcaddon
+if sys.version_info < (2, 7):
+ import simplejson
+else:
+ import json as simplejson
__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
@@ -34,12 +37,12 @@ class Main:
self.albumid = ''
def _get_albumid( self ):
- json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"properties": ["artist"] }, "id": 1}')
+ json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method":
"AudioLibrary.GetAlbums", "params": {"properties": ["title", "artist"] }, "id":
1}')
json_query = unicode(json_query, 'utf-8', errors='ignore')
json_response = simplejson.loads(json_query)
if (json_response['result'] != None) and
(json_response['result'].has_key('albums')):
for item in json_response['result']['albums']:
- album = item['label']
+ album = item['title']
if album == self.album:
artist = item['artist']
if artist == self.artist:
-----------------------------------------------------------------------
Summary of changes:
script.playalbum/addon.xml | 2 +-
script.playalbum/changelog.txt | 6 ++++++
script.playalbum/default.py | 9 ++++++---
3 files changed, 13 insertions(+), 4 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