Kodi Community Forum

Full Version: MyPlaylist.xml Window.Is vs Window.IsVisible
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been unable to get MyPlaylist to work correctly. In Kodi 16 MyVideoPlaylist and MyMusicPlaylist both work correctly and as desired. Each is based largely on MyVideoNav and MyMusicNav respectively, and both video and music have some matching view types (eg., panel, wide, etc), but with different definitions.

So my attempt at getting MyPlaylist to work was this:

Code:
<window>
    <defaultcontrol always="true">51</defaultcontrol>
    <menucontrol>9000</menucontrol>
    <views>51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70</views>
    <controls>
        <include condition="Window.Is(musicplaylist)">MusicPLWindow</include>
        <include condition="Window.Is(videoplaylist)">VideoPLWindow</include>
    </controls>
</window>

But it doesn't work (window doesn't seem to load). But if I change the include condition to Window.IsActive or Window.IsVisible, then it works. I thought this was the use case for "Window.Is()"?

scott s.
.
It might be that Window.Is() doesnt work yet at include time. Also, Window.Is() only really makes sense for dialogs since you can have several of them open at the same time.
(2016-09-30, 03:12)phil65 Wrote: [ -> ]It might be that Window.Is() doesnt work yet at include time.

must be something like that, visible conditions based on Window.IS() do work, but includes don't
but it's odd that include conditions based IsActive() / IsVisible() do work...
What you wrote about dialogs vs windows makes sense now that I think about it.

scott s.
.