Posts: 403
Joined: Apr 2009
Reputation:
2
I am trying to add a button to load and play a playlist (similar to how Partymode works).
I have the button ready but can't seen to figure out how to load the playlist and activate (play) it.
The playlist is called 'chill and was made using the XBMC smartlist function.
Thanks
Posts: 6,339
Joined: Jul 2010
Reputation:
116
artrafael
Team-XBMC Forum Moderator
Posts: 6,339
Did you add this button by modifying the default skin or are you using one of the Confluence mods that support custom menu buttons? If it's the latter, you may want to ask on the thread dedicated to that particular mod.
Posts: 1,155
Joined: Aug 2008
<onclick>PlayMedia(special://profile/playlists/music/chill.xsp)</onclick> ?
Posts: 276
Joined: Jan 2013
Reputation:
0
Where would I enter that line of code to do something similar?
Posts: 1,155
Joined: Aug 2008
(2013-03-20, 22:35)JDizzy Wrote: (2013-03-20, 22:10)toiva Wrote: <onclick>PlayMedia(special://profile/playlists/music/chill.xsp)</onclick> ?
BINGO!
Thanks Toiva
Maybe one last question, now that the music has started, how could you have it go straight into the visualization screen (ProjectM)?
I really have no idea if this will work but try adding a second onclick command right below the first
<onclick>PlayMedia(special://profile/playlists/music/chill.xsp)</onclick>
<onclick>ActivateWindow(visualisation)</onclick>
Posts: 6,339
Joined: Jul 2010
Reputation:
116
artrafael
Team-XBMC Forum Moderator
Posts: 6,339
If that doesn't work, you can try writing a simple Python script that executes the PlayMedia() and ActivateWindow() functions and then execute this script with <onclick>RunScript(path/to/your/script.py)</onclick>
Posts: 1,155
Joined: Aug 2008
I tested it just a moment ago and it worked fine.
Posts: 1,155
Joined: Aug 2008
Did you remember to restart XBMC after adding the second onlick action?