The branch, frodo has been updated
       via  b36f76027a44e7bbb7e978586f11b5a4be885fa6 (commit)
      from  11e29b34da692eed6ddfa180f502a08658c548c9 (commit)

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

commit b36f76027a44e7bbb7e978586f11b5a4be885fa6
Author: ronie <[email protected]>
Date:   Mon May 13 20:40:47 2013 +0200

    [script.playalbum] -v0.1.3

diff --git a/script.playalbum/README.txt b/script.playalbum/README.txt
index e3b2adf..d283a66 100644
--- a/script.playalbum/README.txt
+++ b/script.playalbum/README.txt
@@ -6,3 +6,6 @@ RunScript(script.playalbum,albumid=$INFO[ListItem.DBID])
 at song level, use:
 RunScript(script.playalbum,songid=$INFO[ListItem.DBID])
 
+it's also possible to start playing a specific track, e.g. from the track list 
in the album info dialog:
+RunScript(script.playalbum,albumid=$INFO[ListItem.DBID]&amp;tracknr=$INFO[Container(50).ListItem.TrackNumber])
+
diff --git a/script.playalbum/addon.xml b/script.playalbum/addon.xml
index e92ef7c..1af15a8 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.1.2" 
provider-name="ronie">
+<addon id="script.playalbum" name="Play Album Script" version="0.1.3" 
provider-name="ronie">
        <requires>
                <import addon="xbmc.python" version="2.1.0"/>
                <import addon="script.module.simplejson" version="2.0.10"/>
@@ -10,5 +10,7 @@
                <summary lang="en">Play Album Script</summary>
                <description lang="en">Script will play a full album when 
executed in the album info dialog.</description>
                <platform>all</platform>
+               <forum>http://forum.xbmc.org/showthread.php?tid=104189</forum>
+               <source>https://code.google.com/p/ronie/source/</source>
        </extension>
 </addon>
diff --git a/script.playalbum/changelog.txt b/script.playalbum/changelog.txt
index 22bf714..a8861d3 100644
--- a/script.playalbum/changelog.txt
+++ b/script.playalbum/changelog.txt
@@ -1,3 +1,6 @@
+v0.1.3
+- added tracknr property
+
 v0.1.2
 - python version bump
 
diff --git a/script.playalbum/default.py b/script.playalbum/default.py
index e13b6cf..91a9065 100644
--- a/script.playalbum/default.py
+++ b/script.playalbum/default.py
@@ -32,6 +32,7 @@ class Main:
             params = {}
         self.songid = int(params.get( 'songid', False ))
         self.albumid = int(params.get( 'albumid', False ))
+        self.tracknr = int(params.get( 'tracknr', False ))
 
     def _get_albumid( self ):
         json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": 
"AudioLibrary.GetSongDetails", "params": {"properties": ["artist", "album"], 
"songid":%s }, "id": 1}' % self.songid)
@@ -50,6 +51,8 @@ class Main:
 
     def _play_album( self ):
         xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Player.Open", 
"params": { "item": { "albumid": %d } }, "id": 1 }' % self.albumid)
+        if self.tracknr and self.tracknr > 0:
+            xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Player.GoTo", 
"params": { "playerid": 0, "to": %d }, "id": 1 }' % (self.tracknr - 1))        
 
 if ( __name__ == "__main__" ):
     Main()

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

Summary of changes:
 script.playalbum/README.txt    |    3 +++
 script.playalbum/addon.xml     |    4 +++-
 script.playalbum/changelog.txt |    3 +++
 script.playalbum/default.py    |    3 +++
 4 files changed, 12 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to