Open Smart Playlist from Library Node
#1
I'm trying to open a Smart Playlist using Kodi's categories but it doesn't work using the below. Is there a way to open playlists from library nodes? I want the playlist as a category item on the home screen that returns to the home screen on exit.
 
Quote:<node order="10" type="folder">
    <label>Watchlist</label>
    <icon>special://skin/extras/menu-icons/White Icons/watchlist.png</icon>
    <path>special://userdata/playlists/video/watchlist.xsp</path>
</node>

The only way I found to do this was through super favourites but it does not exit clean. When exiting you see it navigating back through super fav folders before exiting to the home screen. I decided to quickly write an addon that Activates the MyvideoNav window and opens the playlist. I then called it from the library node. It works as intended except it does not back out to the home screen on exit.

Does anyone have any ideas on how this can be accomplished?
Reply
#2
Add ,return to make it go straight back the the home screen.

Code:
ActivateWindow(window[,dir,return])

Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See Window IDs for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
Reply
#3
I have tried adding ,return already and it doesn't work. It only takes me back to the library menu.
Reply
#4
(2022-07-25, 20:57)Hitcher Wrote: Add ,return to make it go straight back the the home screen.

Code:
ActivateWindow(window[,dir,return])

Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See Window IDs for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.

I have tried adding ,return already and it doesn't work. It only takes me back to the library menu.
Reply
#5
Create a smartplaylist to open this watchlist smartplaylist and that will tell you the xml to go in the node xml.
Reply
#6
(2022-07-25, 22:29)jjd-uk Wrote: Create a smartplaylist to open this watchlist smartplaylist and that will tell you the xml to go in the node xml.

Thanks for the info! I have not tried this. I will test and get back to you.
Reply
#7
So you can combine smartplaylists one of the rules is Playlist. So you create a rule Playlist is watchlist and you should be able to copy and paste the rule from the xsp for new playlist into the node xml.
Reply
#8
(2022-07-25, 20:52)Pug3ter Wrote: Does anyone have any ideas on how this can be accomplished?
Is the ultimate goal to create a 'Watchlist' node on your Movies home screen, that when selected will show you all the movies you've added to your watchlist.xsp playlist then take you back to the home screen when select 'back' button?

If so, there is a fairly easy way to achieve this by just installing the metadata editor addon from the official Kodi repo.
Once installed, you can then apply a 'Wishlist' tag to your movie(s), by using this option via the 'context' menu when browsing movies. 
Once done, you can create a simple node to include on your movies home menu, using the following info:-
xml:
<node type="filter">
    <label>My Watchlist</label>
    <content>movies</content>
    <order direction="ascending">sorttitle</order>
    <limit>1000</limit>
    <rule field="tag" operator="is">
        <value>Watchlist</value>
    </rule>
    <icon>C:\Users\Mini-Pc\AppData\Roaming\Kodi\addons\skin.estuary.pvr.plus\media\defaultaddonsinstalled.png</icon>
</node>

The above node will provide a list of movies where you have applied the 'Wishlist' tag using the metadata editor. I use the exact same feature on my Kodi set-up and works very well. If you want remove a movie from your 'Wishlist', just select via context menu to remove the tag.
Hope this is useful for your own needs
Reply
#9
(2022-07-25, 23:00)jjd-uk Wrote: So you can combine smartplaylists one of the rules is Playlist. So you create a rule Playlist is watchlist and you should be able to copy and paste the rule from the xsp for new playlist into the node xml.

I gave this a try but i couldn't get it to open the playlist via the node. As you suggested,  I created a playlist that combined my current playlist. It does open my other playlist but when I add the rule to the node nothing happens. I suspect it doesn't know where this combined playlist is located. What is required for the path? I tried the special protocol to the file name but that doesn't work?

Here's the Combined Playlist
Quote:<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>combinedplaylist</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>watchlist(movies)</value>
    </rule>
</smartplaylist>

and here is the Library Node
Quote:<node order="10" type="folder">
    <label>Watchlist</label>
    <icon>special://skin/extras/menu-icons/White Icons/watchlist.png</icon>
    <rule field="playlist" operator="is">
        <value>watchlist (movies)</value>
    </rule>
<path>special://userdata/playlists/video/combinedplaylist.xsp</path>
</node>
Reply
#10
(2022-07-25, 23:00)jjd-uk Wrote: So you can combine smartplaylists one of the rules is Playlist. So you create a rule Playlist is watchlist and you should be able to copy and paste the rule from the xsp for new playlist into the node xml.

I got it working! I missed the content type in the node. This works exactly as I intended! Thanks for your help
Reply
#11
(2022-07-25, 23:12)Dumyat Wrote: The above node will provide a list of movies where you have applied the 'Wishlist' tag using the metadata editor. I use the exact same feature on my Kodi set-up and works very well. If you want remove a movie from your 'Wishlist', just select via context menu to remove the tag.
Hope this is useful for your own needs

Thanks for the reply. It just so happens that I found your skin the other day and I love it. You did a beautiful job on the PVR section. Great work! I was wondering how the watchlist in your skin functioned. I saw the option on the added view types. Thanks for sharing with me. If you don't mind I may have a few questions in the near future, when I get a chance to play around with the skin.
Reply
#12
(2022-07-26, 10:10)Pug3ter Wrote:
(2022-07-25, 23:00)jjd-uk Wrote: So you can combine smartplaylists one of the rules is Playlist. So you create a rule Playlist is watchlist and you should be able to copy and paste the rule from the xsp for new playlist into the node xml.

I got it working! I missed the content type in the node. This works exactly as I intended! Thanks for your help

Not sure if you followed as I intended. The purpose of the new combined playlist was simply to reveal the correct xml rule syntax. Once you have that syntax you can simple delete that new playlist, and just use the xml syntax to refer to your original watchlist playlist.

Just thought I'd attempt to clarify in case you were referring to the combined playlist in the node, as there's no need for this. However doesn't make any difference other you having an extra unnecessary smartplaylist.
Reply
#13
(2022-07-26, 10:47)jjd-uk Wrote: Not sure if you followed as I intended. The purpose of the new combined playlist was simply to reveal the correct xml rule syntax. Once you have that syntax you can simple delete that new playlist, and just use the xml syntax to refer to your original watchlist playlist.

Yes, i figured it out after. I have the playlist I created deleted. Thanks for your help
Reply
#14
(2022-07-26, 10:28)Pug3ter Wrote: I was wondering how the watchlist in your skin functioned. I saw the option on the added view types. Thanks for sharing with me. If you don't mind I may have a few questions in the near future, when I get a chance to play around with the skin.
The Watchlist feature on my skin mod works the same way, just install metadata editor and create a new node as detailed my previous post. You can then either use the 'Flix Large' view where there is a dedicated button to create the watchlist tag once you are on the movie of your choice, or create the watchlist tag via the context menu option on the other views. Here's my home screen after creating the watchlist node. My skin mod also includes a Watchlist widget further down screen on the movies home menu:-
ImageImage

No problem about asking any questions in the future. I will try my best to answer anything you have.
Reply
#15
@jjd-uk I'm having issues sorting these playlists. I tried sorting via the GUI, Playlist and node. Neither work! Any idea why sorting is not working? I want to sort like below.
Quote:<order direction="descending">playlist</order>
Reply

Logout Mark Read Team Forum Stats Members Help
Open Smart Playlist from Library Node0