Kodi Community Forum
Can you map a remote button to refresh a smartplaylist? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
---- Thread: Can you map a remote button to refresh a smartplaylist? (/showthread.php?tid=131983)



Can you map a remote button to refresh a smartplaylist? - KidKiwi - 2012-05-20

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




RE: Can you map a remote button to refresh a smartplaylist? - jhsrennie - 2012-05-21

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.


RE: Can you map a remote button to refresh a smartplaylist? - KidKiwi - 2012-05-21

(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.


RE: Can you map a remote button to refresh a smartplaylist? - jhsrennie - 2012-05-22

Yes, you'd need a button for each playlist. I don't know of a generic "refresh" function.


RE: Can you map a remote button to refresh a smartplaylist? - spiff - 2012-05-22

Container.refresh would refresh current listing iirc


RE: Can you map a remote button to refresh a smartplaylist? - KidKiwi - 2012-05-22

(2012-05-22, 13:34)spiff Wrote: Container.refresh would refresh current listing iirc

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


RE: Can you map a remote button to refresh a smartplaylist? - KidKiwi - 2012-05-23

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.






This forum uses Lukasz Tkacz MyBB addons.