Kodi Community Forum

Full Version: Skin xml code to launch a specific file/playlist?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible for a button or other elements in a skin to link to a specific file or playlist? And what would this code be?

For example; I have a file E:\screensavers\fireplace.mkv and a custom button in my homescreen that says 'Fireplace'. How could I make that button launch that file?
<onclick>PlayMedia(E:\screensavers\fireplace.mkv)</onclick>
Sounds like you're trying to do something sexy....

"Hey baby. Hold on"......clicks on fireplace screensaver

"Now, where were we.".......gets down to business with the beautiful glow of a fireplace in the background.
Thanks for the quick reply!

Picodegiao: This does perfectly compliment my 'Play Barry White music'-button Wink
How about opening a music folder (not included in library)?

Example; under Music > Files, I have a folder called 'Radio' with .strm files for streaming radio. The folder is a source (E:\Radio\) that isn't included in the library. All works well and the .strm files play as they should. But I'd like to add a 'Radio' button to my home screen which opens this Radio source in music files directly. Without having to go to Files.

EDIT:
Sorry, found it: XBMC.ActivateWindow(musicfiles, Radio, return)
Only the 'return' parameter doesn't seem to work in the Files window, so the back button takes you back to the sources root...Sad
,return doesn't work for files only library.

Another option is to make a extra home button called "radio" and set in submenu your favourite radio streams.
Start the streams with<onclick>PlayMedia(path to .strm)</onclick>
It won't go back to source root. Wink

See MiniMeedia Waffa! if you want an example.