20 Nov 2019 - TVDB Scraper v3.2.0 is now available which reinstates scraping. TVDB are still in the process of fixing a number of bugs so there may still be further breakages. See this post. 2901570 (post)

Smart Playlists - Exclude two or more rules
#1
(2019-11-01, 23:42)Karellen Wrote:
(2019-10-25, 17:40)billmartian Wrote: dough however have a questian, the movies that you list in your "Universes" is there a way to exclude them from the "Movies" Menu ?
Strangely not as easy as I first thought so took a little while to figure this out.

Create a new Smart Playlist as shown in the image below. The first rule needs to include all movies in your library. So setting a Year rule for all movies after 1900 should pick up all movies.
Then add your rules to exclude your Universe playlists.
Then set Match to "Match all rules" (which seems unusual but it was the only way it worked)

Once you have your playlist, in a suitable skin edit the Movie menu item so it points to the new smart playlist.

Image 

This is not about the Arrowverse but about the playlist and main menu items. I have main menu items of 4k movies and also 4k TV shows, but they also show up in my main menu items of TV and Movies. Would your approach also work for this also? I have my 4k stuff on another NAS and if I excluded that ip in my rules could that possible work?  Sorry for the OT but was looking through some stuff and this thread came up in my ideas.
Thanks
Reply
#2
@Harro

It should work.

How many rules are you trying to add to the smart playlist? The smart playlist works as expected if it uses a single rule - eg Path does not contain "something"

If you are using two rules to exclude two paths in the same playlist, then it does not work as expected and you need to use the method shown in the image. I tested with my own movie library and it works, but did not test for tv shows.

Also, I have split your post into a new thread.

Image
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2019-11-05, 21:28)Karellen Wrote: @Harro

It should work.

How many rules are you trying to add to the smart playlist? The smart playlist works as expected if it uses a single rule - eg Path does not contain "something"

If you are using two rules to exclude two paths in the same playlist, then it does not work as expected and you need to use the method shown in the image. I tested with my own movie library and it works, but did not test for tv shows.

Also, I have split your post into a new thread.

Image

I tested this playlist out with the amended menu action for movies and it does in deed work. Now I guess I will need to amend the other actions that are listed...such as newly added movies and un watched movies etc.. I guess I could customize that list. Any ideas??
thanks
Reply
#4
(2019-11-05, 21:54)Harro Wrote: I tested this playlist out with the amended menu action for movies and it does in deed work.
Great!

(2019-11-05, 21:54)Harro Wrote: I guess I could customize that list. Any ideas??
Sorry, I am not sure what you mean by this. Do you mean the default nodes? If yes, you would need to edit the node xml files.
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2019-11-05, 23:26)Karellen Wrote:
(2019-11-05, 21:54)Harro Wrote: I tested this playlist out with the amended menu action for movies and it does in deed work.
Great!
(2019-11-05, 21:54)Harro Wrote: I guess I could customize that list. Any ideas??
Sorry, I am not sure what you mean by this. Do you mean the default nodes? If yes, you would need to edit the node xml files.  
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="10" type="folder">
    <label>20382</label>
    <icon>DefaultRecentlyAddedMovies.png</icon>
    <path>videodb://recentlyaddedmovies/</path>  <-------Can this be replaced by my source? IP address://recentlyaddedmovies
</node>
I would rename to recently added 4k movies or something xml
Reply
#6
I think it can, but I am not sure if the node then just becomes "file browser" mode.

Maybe @jjd-uk can answer
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
@Harro

I just tested this on my library and it works. So adjust it to match your paths...

<?xml version='1.0' encoding='UTF-8'?>
<node order="2" type="filter">
<label>4K</label>
<content>movies</content>
<icon>C:\Users\HTPC\AppData\Roaming\Kodi\userdata\library\video\movies\mpaaratings\ratedg.png</icon>
<order direction="ascending">sorttitle</order>
<match>all</match>
<rule field="year" operator="greaterthan">
<value>1900</value>
</rule>
<rule field="path" operator="doesnotcontain">
<value>smb://MASTER/HTPC Movies from TV/</value>
</rule>
<rule field="path" operator="doesnotcontain">
<value>smb://MASTER/HTPC Movies Overflow/</value>
</rule>
</node>

Take not of the "node order" and you can place it where you like in the list. Icon is not cached, so if using an ssd drive, best to save it there to stop hard drives from spinning up.
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#8
(2019-11-06, 00:53)Karellen Wrote: @Harro

I just tested this on my library and it works. So adjust it to match your paths...

<?xml version='1.0' encoding='UTF-8'?>
<node order="2" type="filter">
<label>4K</label>
<content>movies</content>
<icon>C:\Users\HTPC\AppData\Roaming\Kodi\userdata\library\video\movies\mpaaratings\ratedg.png</icon>
<order direction="ascending">sorttitle</order>
<match>all</match>
<rule field="year" operator="greaterthan">
<value>1900</value>
</rule>
<rule field="path" operator="doesnotcontain">
<value>smb://MASTER/HTPC Movies from TV/</value>
</rule>
<rule field="path" operator="doesnotcontain">
<value>smb://MASTER/HTPC Movies Overflow/</value>
</rule>
</node>

Take not of the "node order" and you can place it where you like in the list. Icon is not cached, so if using an ssd drive, best to save it there to stop hard drives from spinning up.

So I am guessing I will need to configure other nodes if I want to use the movie widgets that display on the regular movie menu. I also wondering how to stop the videodb from collecting the info from sources at the very start. Is there a way to add sources before I even start Kodi? I would like to have all my xml and sources set before I adjust the main menu. I set up my main menu and then added 3d movies source but as soon as I add the 3d movie source the main  movies pick then up. So if I could set source up with out scanning to library first I think it would work.
Image
Reply
#9
My goal here is to set main menu items for all items with their appropriate categories. 3d movie, 4K movies, 4k TV shows..etc. The draw back is to not have those item duplicated in the main menu items. So the nodes would separate them. Then when doing a library scan all item for appropriate categories would show under the correct menu. Does this make sense.
Reply
#10
Ok, I see what you are aiming for. I thought it was just a simple extra node you wanted.

You want 3d to show 3d movies only, and the widgets in 3d to show 3d content only, but you don't want the titles listed in 3d to display in the Movies menu item.

Not something that I have looked into. Lets wait and see if others know how to do. If nothing happens after a couple of days, I will have a poke around and see how to do. Hopefully @jjd-uk or @DaVu might know.
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)  
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
Exactly!
I am trying out some things with the nodes from this thread that jjd-uk posted 
I know I will have a lot of xml files to change to make this work if it will even work, but would be awesome on my end. Testing all on another computer with small sample of files before letting loose on my main setup.
Reply
#12
It's do-able.  I have my kids media all in separate areas to my own.  All my smart playlists are based on location but there is no reason that you can't use audio channels and/or resolution as well to give even finer grained control.

My main library node excludes all my kids stuff and any christmas stuff too.  As I said, this is path based but you could exclude other playlists instead and achieve the same thing.  All the smart playlists can be converted into nodes if required, but I haven't had a need to do that, it all works well as it is.

Main Library
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Main library</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>Kids</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>xmas</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/MusicVideos/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>smb://HS-DHGL925/share/Music Videos/</value>
    </rule>
    <order direction="ascending">dateadded</order>
</smartplaylist>
Kids Films
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Kids Films</name>
    <match>one</match>
    <rule field="path" operator="contains">
        <value>smb://DIAMOND/Kids Films/</value>
    </rule>
    <rule field="path" operator="contains">
        <value>smb://DIAMOND/Kids-Films2/</value>
    </rule>
    <rule field="path" operator="contains">
        <value>smb://HS-DHGL925/share/Kids Films/</value>
    </rule>
    <rule field="path" operator="contains">
        <value>/media/sdd1/Kids Films/</value>
    </rule>
    <order direction="ascending">dateadded</order>
</smartplaylist>
Kids films - In progress
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>In-progress films</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/Movies/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>xmas</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/MusicVideos/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>smb://HS-DHGL925/share/Music Videos/</value>
    </rule>
    <rule field="inprogress" operator="true" />
    <limit>15</limit>
    <order direction="descending">lastplayed</order>
</smartplaylist>
Kids films - Unwatched
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Kids unwatched films</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/Movies/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>xmas</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/MusicVideos/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>smb://HS-DHGL925/share/Music Videos/</value>
    </rule>
    <rule field="dateadded" operator="after">
        <value>1900-01-01</value>
    </rule>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <limit>15</limit>
    <order direction="descending">random</order>
</smartplaylist>
Kids Films - Widget list (limited to 8)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Kids Films-widget list</name>
    <match>one</match>
    <rule field="path" operator="contains">
        <value>smb://DIAMOND/Kids Films/</value>
    </rule>
    <rule field="path" operator="contains">
        <value>smb://DIAMOND/Kids-Films2/</value>
    </rule>
    <rule field="path" operator="contains">
        <value>smb://HS-DHGL925/share/Kids Films/</value>
    </rule>
    <order direction="descending">dateadded</order>
    <limit>8</limit>
</smartplaylist>


Then you just need to link the appropriate menu entry to the appropriate list and all your media gets separated out.  As you can see though, just for the kids stuff there are a few xml files (there are others too, such as random and recently added).  All this stuff is then pretty much duplicated for the main library but obviously with paths to exclude the kids stuff from it although I could have excluded their stuff by excluding the 'Kids Films' playlist.

It does take a while to get set up though.  I decided to use paths as the criteria simply because it's easier to just drop something into a directory and have it appear in the right list as well as it being more logical to me to have this stuff separated on disk.

Basically, you need a playlist (or 3!) for each content type that you want to show and that excludes content from any of the other playlists.  So for example, if you set up a 4k playlist and get that working, then you would next set up a 3D playlist, test it works and then exclude the 3D list from the 4K one and vice versa.  Then you will get only 4K in one list and only 3D in the other.
Learning Linux the hard way !!
Reply
#13
Don't really follow exactly what is now being asked, so some general points.

Smartplaylists are a great proving ground to see what's possible but when producing custom structure I personally find custom nodes to be better. When I was learning I'd create the smartplaylist then look at the xml file to see how it was done so once I gained the understanding of xml structure I was able to create and edit the xml nodes directly and avoid using the node editor which I personally find rather clunky, doing it direct in xml is far quicker. In addition understanding the xml and how the xml files are pointed to means I can modify the stock version of Estuary that ships with Kodi so in effect creating my own custom mod, as again personally I don't like the skins that rely on scripts to do skin mods e.g. skin shortcuts.

When you want to point to nodes in the skin xml files for widgets and menus then it's always in the form

library://path_to_node

So if I create custom nodes:

Videos -> Movies -> 4K
Videos -> TV Shows -> 4K

The paths to these nodes are:

library:/videos/movies/4K
library:/videos/tvshows/4K

One thing to be careful of is that if you modify any of the default nodes then make sure the correct path is being used. For example by default:

videodb://movies/genres/
library:/videos/movies/genres

will match in displayed contents, however if you modify the node rules then you must use the library:/videos/movies/genres path. The videodb;// paths access the database directly thus bypassing the node configuration rules.
Reply
#14
(2019-11-06, 12:47)jjd-uk Wrote: Don't really follow exactly what is now being asked, so some general points.

Smartplaylists are a great proving ground to see what's possible but when producing custom structure I personally find custom nodes to be better. When I was learning I'd create the smartplaylist then look at the xml file to see how it was done so once I gained the understanding of xml structure I was able to create and edit the xml nodes directly and avoid using the node editor which I personally find rather clunky, doing it direct in xml is far quicker. In addition understanding the xml and how the xml files are pointed to means I can modify the stock version of Estuary that ships with Kodi so in effect creating my own custom mod, as again personally I don't like the skins that rely on scripts to do skin mods e.g. skin shortcuts.

When you want to point to nodes in the skin xml files for widgets and menus then it's always in the form

library://path_to_node

So if I create custom nodes:

Videos -> Movies -> 4K
Videos -> TV Shows -> 4K

The paths to these nodes are:

library:/videos/movies/4K
library:/videos/tvshows/4K

One thing to be careful of is that if you modify any of the default nodes then make sure the correct path is being used. For example by default:

videodb://movies/genres/
library:/videos/movies/genres

will match in displayed contents, however if you modify the node rules then you must use the library:/videos/movies/genres path. The videodb;// paths access the database directly thus bypassing the node configuration rules.
My main quest is to have Main menu items for 4k Movies, 3D movies and 4K TV shows along side the standard menu items of Movie, TV shows, etc.. I would like it once the item is selected to display the standard categories and widgets with some exceptions.
Image

 Example.. 4k Movie item is highlighted in main menu and display would show the same categories and widgets as main Movie item.
Image  
So would nodes and playlist have to be written for those custom items on main menu? And with the nodes can the structure be as so,  userdata/library/movies/4k/main/category and the same for 3d and then again under tvshows?

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="30" type="filter">
 <label>10024</label>
 <icon>DefaultMovieTitle.png</icon>
 <content>movies</content>
 <order direction="ascending">sorttitle</order>
</node>
and can the node be configured the same way as the rules in Black_eagles example? Using the rule of doesnotcontain? I am running 2 NAS setup. One holds all my regular TV and Movies while the other is holding all the 3d and 4k, so the doesnotcontain would prove most useful. 
Code:
<smartplaylist type="movies">
    <name>Main library</name>
    <match>all</match>
    <rule field="path" operator="doesnotcontain">
        <value>Kids</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>xmas</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>nfs://192.168.1.50/media/sde1/MusicVideos/</value>
    </rule>
    <rule field="path" operator="doesnotcontain">
        <value>smb://HS-DHGL925/share/Music Videos/</value>
    </rule>
    <order direction="ascending">dateadded</order>
</smartplaylist>
Once nodes are created, and categories created, the action on click for the nodes would go to a playlist or video source for that node? 
I have my 4k movies excluded from scans and manually refresh that data once a new movie is added. I would like to scan library to new content but then my 4k movies end up under the main movie menu. I only want 4k under 4k and the same would go for the TV shows. But I do want everything scanned into videodb.
So collections would show both.
Image 
I guess I am not sure which to use a playlist or to edit the nodes or both.
Reply
#15
Under Videos you would need to specify the content types so:

Videos
-> Movies
-> 4K Movies
-> 3D Movies
-> TV Shows
-> 4K TV Shows
-> 3D TV Shows

There are your top level parent nodes, then underneath you create your child nodes depending how you want to categorise each, so this is the

Video
-> 4K Movies -> Recently Added
-> 4K Movies -> In Progress
-> 4K Movies -> Titles
-> 4K Movies -> Sets
-> 4K Movies -> Studios
etc
etc

Then you would need to do the same for 3D.

To get a Categories top line you point the widget at Video -> 4K Movies so the widget fills the line with all the configured child nodes that sit under 4K Movies. Then for the Content widgets you point to the relevant child node under which the content sits e.g. Video -> 4K Movies -> Recently Added

Then for the existing Movies and TV Shows nodes you would need to add rules to exclude the 4K and 3D content.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Smart Playlists - Exclude two or more rules00