Kodi Community Forum

Full Version: Can you map a remote button to refresh a smartplaylist?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings,

I'm using xbmcbuntu, but this question isn't os specific I don't think.

I want to map a remote button that refreshes a SPL. For example, a SPL setup to return 10 random movies. The only way I know how to refresh it is to back out of the listing screen and re-activate the playlist. I'd like to be able to just press a remote button. Possible?

Is this also possible by having a viewtype that has a "refresh" button in it to do the same thing?? I found "container.refresh" in the wiki, but no examples of how to use it, and no searches have returned what I'm looking for. Most of the posts are regarding doing it with python. I did find this but these guys are speaking "Computer" as their first language while English is mine Big Grin

This works:

Code:
<keymap>
  <global>
    <keyboard>
      <v mod="ctrl">ActivateWindow(MusicLibrary, special://profile/playlists/music/Test.xsp)</v>
    </keyboard>
  </global>
</keymap>

Every time I press ctrl-V it reopens the Test.xsp playlist and I get a new set of random songs.
(2012-05-21, 12:30)jhsrennie Wrote: [ -> ]This works:

Code:
<keymap>
  <global>
    <keyboard>
      <v mod="ctrl">ActivateWindow(MusicLibrary, special://profile/playlists/music/Test.xsp)</v>
    </keyboard>
  </global>
</keymap>

Every time I press ctrl-V it reopens the Test.xsp playlist and I get a new set of random songs.

Thx for the help.

It would seem (if I read this correctly) that with this method you would need a button for each playlist. I was hoping there was a "refresh" command or something that would refresh the playlist / or list etc. If this is the case, then a button in the gui would also need to be hard coded for the same thing?

I'll give this a go.
Yes, you'd need a button for each playlist. I don't know of a generic "refresh" function.
Container.refresh would refresh current listing iirc
(2012-05-22, 13:34)spiff Wrote: [ -> ]Container.refresh would refresh current listing iirc

Thx Spiff...I'll give this a shot.
Update

I added this to the keyboard key "K" <k>XBMC.Container.Refresh</k> and it refreshed the playlist as required. Very excellent. I'm of to set a button on the remote.