Can I replicate MyVideoNav button 10? ...Toggle between playlists
#1
Is this possible?... I am attempting to create a custom "filter" or "toggle" that will toggle through 3 different playlists that essentially filter my movie library based on whether the movie is in my Library vs a NEW movie. 

I would love for it to function in the same way the built in control on the MyVideoNav.xml works:
MyVideoNav.xml button 10
10 - button - Show only watched, unwatched or all videos

This one cycles through All videos, Unwatched and Watched videos... If what I want to do is at all possible, I would like to cycle through 3 playilsts: All Movies, Library and NEW Movies - i have these 3 playlists already created and based on whether the movie is in my "Library" folder or my "NEW" folder. This is more useful to me than whether I have watched the movie or not.

Obviously since this is a built it control, I am not able to see how it functions by looking at the .xml and simply copy it. I have been able to create a new button on the MyVideoNav panel to open a playlist, but of course when I select it, the MyVideoNav panel closes, the view behind it closes and then it opens the playlist as a new window.

My button:
Code:
<control type="button" id="1">
                    <description>Custom Library Toggle</description>
                    <textwidth>255</textwidth>
                    <label>All Movies</label>    
                    <include>ButtonCommonValues</include>
                    <onclick>ActivateWindow(Videos,special://profile/playlists/video/2. Library.xsp,return)</onclick>
                    <label2>[COLOR $VAR[ThemeLabelColor]]$INFO[Container.NumItems][/COLOR]</label2>
                    <visible>Container.Content(movies)</visible>
                </control>

...I think there would have to be 3 separate buttons where each has a <visible> tag that displays it only when that playlist is active. Maybe something like String.Contains(playlist,library) ... I haven't figured that part out yet either...

Image of my button (All Movies) vs built-in control (All videos):
Image

Is it possible to "recreate" this built-in control to do what I am envisioning? If so, am I on the right path with using playlists? If so, I need to figure out how to make the playlist open without closing the MyVideoNav panel.

If not, any guidance or ideas would be incredibly helpful. Thanks in advance!
Reply
#2
You can use ReplaceWindow instead of ActivateWindow. That might work better.

Then you can try conditional onclicks using String.IsEqual(Container.FolderName,Whatever the name of the playlist is):
xml:
<name>Recent Movies</name>
Reply
#3
@mikeSiLVO thanks so much for the reply and the tips!

the conditional onclicks work great. I even set up a custom variable to change the label of the button:
Code:
<control type="button" id="1">
                    <description>SMiller Library Toggle</description>
                    <textwidth>255</textwidth>
                    <label>$VAR[CustomLibraryToggle]</label>    
                    <include>ButtonCommonValues</include>
                    <onclick condition="String.IsEqual(Container.FolderName,1. All Movies)">ReplaceWindow(Videos,special://profile/playlists/video/2. Library.xsp,return)</onclick>
                    <onclick condition="String.IsEqual(Container.FolderName,2. Library)">ReplaceWindow(Videos,special://profile/playlists/video/3. New.xsp,return)</onclick>
                    <onclick condition="String.IsEqual(Container.FolderName,3. New)">ReplaceWindow(Videos,special://profile/playlists/video/1. All Movies.xsp,return)</onclick>
                    <label2>[COLOR $VAR[ThemeLabelColor]]$INFO[Container.NumItems][/COLOR]</label2>
                    <visible>Container.Content(movies)</visible>
                </control>

Now it's all working perfectly with the exception that ReplaceWindow() still closes MyVideoNav and the current playlist and then opens the new playlist. Any other ideas on how to accomplish making it switch to the next playlist without closing them?
Reply
#4
Don't think it's possible to duplicate button 10 exactly. I can't think of anything ATM but you can try asking in the Skinning section of the forum.
Reply
#5
No worries, thanks for all the help!
Reply

Logout Mark Read Team Forum Stats Members Help
Can I replicate MyVideoNav button 10? ...Toggle between playlists0