watched/not-watched movie button
#1
Hello everyone, I'm new here.
I successfully made a skin usufull for my own tasks (only watch movies, so I removed photos, music, etc).
Now, since I store my movies in 2 differents directories, "watched" and "not-watched", I'd like to put a button on MyVideoNav that let me switch the list of the movies based on their directory (I'm aware of the radio button that hides the watched movies, but it's not usefull for my case).
So basically this button (or 3 buttons, "watched", "not-watched", "all") should list only the appropriate items, based on their directory, and not rely on tags or on library infos.
Is this possible?
I can do it manually, inside the video navigator, by navigating back until I reach the sources page (here, if I select the "watched" source, I got on the nav only the watched movies, for example), but a quick button to switch views would be awesome
I hope I explained well
many thanks!! Smile
Dimitri
Reply
#2
Untested:

You could create 2 smartplaylists linked to your path:

Example:

Watched.xsp
Unwatched.xsp

Then 2 buttons in myvideo.nav:

Example:

<control type="button" id="10000">
....
....
<onclick>XBMC.ActivateWindow(10025,special://skin/playlists/Watched.xsp)</onclick>
</control>


<control type="button" id="10001">
....
....
<onclick>XBMC.ActivateWindow(10025,special://skin/playlists/Unwatched.xsp)</onclick>
</control>
Reply
#3
this way, should I update the playlist every time I add an item to one of the directories, or there is an auto-update?

or, can I use ActivateWindow to load into the videonavigator only the items of a specific source?
Reply
#4
It will update automagically since it´s a smart playlist. See http://kodi.wiki/view/Smart_playlists for more information.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
thank you,
I created the playlists.
Manually selecting them, I successfully got the results I want, but using XBMC.ActivaWindow won't work, it loads the main file navigator page
Reply
#6
You have to supply the correct internal paths to your playlists (most likely).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#7
you're right, the path was wrong.
Now it works perfectly.
Is there a way to put a label next to the button that tell me how many items are in that playlist?
I usually use $INFO[Container.NumItems] but now I need to get the infos also for those playlists not actually loaded on the container
Reply

Logout Mark Read Team Forum Stats Members Help
watched/not-watched movie button0