View Music List from MusicOSD.xml
#1
I'm trying to create a button to view the current list of music that someone is playing while the MusicOSD.xml is open but can't seem to get it to work.

I've tried:
* ActivateWindow(special://musicplaylists/)
* ActivateWindow(MusicPlaylist)
* ActivateWindow(musicplaylisteditor)
* ActivateWindow(music,special://musicplaylists/)
* ActivateWindow(music,MusicPlaylist)
* ActivateWindow(music,musicplaylisteditor)
* ActivateWindow(music,special://musicplaylists/,return)
* ActivateWindow(music,MusicPlaylist,return)
* ActivateWindow(music,musicplaylisteditor,return)

But none of them work. I'm pretty sure that some of those are incorrect syntax, but was just trying to figure out what I could use. I am pretty sure that it is possible to do as I can hit the "N" key on the keyboard and it works as expected.

Thanks for any help.
Reply
#2
Looking at the same button on Estuary, the following onclick is used:-
ActivateWindow(musicplaylist)
Maybe the capitol M and P on what you've tried is the issue. Here's the full button control item, which might also help you out:-
xml:
<control type="radiobutton" id="70051">
                    <include content="OSDButton">
                        <param name="texture" value="osd/fullscreen/buttons/playlist.png"/>
                    </include>
                    <onclick>Dialog.Close(all, true)</onclick>
                    <onclick>ActivateWindow(musicplaylist)</onclick>
                    <visible>Integer.IsGreater(Playlist.Length(music),0)</visible>
                </control>

Hope this helps.
Reply
#3
try ActivateWindow(musicplaylist,return)

All lowercase
Reply
#4
I've had <onclick>ActivateWindow(MusicPlaylist)</onclick> working in my skin for years.
Reply
#5
The DialogClose before the ActivateWindow is what makes the difference. Had to figure that out as well when trying to get this to work...
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#6
(2024-01-07, 23:16)Chillbo Wrote: The DialogClose before the ActivateWindow is what makes the difference. Had to figure that out as well when trying to get this to work...
Ah yes, forgot about that requirement.

These are the full actions in my button:

xml:
<onclick>Close</onclick>
<onclick>ActivateWindow(MusicPlaylist)</onclick>
Reply
#7
(2024-01-07, 23:16)Chillbo Wrote: The DialogClose before the ActivateWindow is what makes the difference. Had to figure that out as well when trying to get this to work...

Most dialogs in Kodi (including the OSD) are modal, which means they will prevent the underlying window changing while the modal dialog is still active.

I think the only modeless dialogs are the toast ones (i.e. notification, busy, volume, extended progress). Everything else will block window changes.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
Ahhhh! Got it working now. Thanks for letting me know and letting me know why it was happening.
Reply

Logout Mark Read Team Forum Stats Members Help
View Music List from MusicOSD.xml0