v17 Rate my music tracks
#1
Hi,

I have setup a Raspberry Pi with Kodi, Party Mode and the PartyModeAutostart add-on, I am wondering how can I easily and quickly rate each track as it appears/plays?

I would then change the PartyMode rules so that only tracks with a rating greater than 'X' are included in future?

Thanks in advance

Lee
Reply
#2
The latest Krypton builds have the ability to set a key action to "setrating". But this only works in the Music OSD dialog. So the first step is to create or add to your user keyboard.xml the keymap:

Code:
    <MusicOSD>
        <keyboard>
            <F8>setrating</F8>
        </keyboard>
    </MusicOSD>

here I use the F8 key on my keyboard. You could of course use any key you want. That key will bring up a dialog where you set your rating to 0-10 using up/down to nav and then enter/select.

Now the problem is getting that in the partymodeautostart. You could just bring up the music full screen (visualisation) window, then the menu (music OSD menu), but I hacked the script to do it for me.

In partymodeautostart there is a settings option to bring up the music visualisation window when it autostarts. So you can check that option. That gets you part way there. Then I edited the script file PartymodeAutostart.py. Scroll down in there to find the sub definition "def activateVisualisation(self):"

then add a line so it looks like this:

Code:
# if user have not stopped party mode in meantime
            if xbmc.Player().isPlaying():
                xbmc.executebuiltin("XBMC.ActivateWindow(visualisation)")
                xbmc.executebuiltin("XBMC.ActivateWindow(MusicOSD)")

Note that if you don't do Python, in that language leading spaces on lines are important. So make sure your new line is indented USING SPACES so it is exactly lined up with the line above it. Do not use a "tab" or anything else -- only spaces.

So after the music visualisation window is opened, the music OSD menu is also opened. Then the key you assigned works. It looks good in Confluence skin IMO. Can't say for other skins. Confluence also shows you the rating you set as shaded stars (1-10).

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Rate my music tracks0