How to add UNWATCHED to custom menu?

I have the following custom menu item. I can’t get a rule for “unwatched” to work. Can anyone assist please?

Recently added other movies
    <rule field="genre" operator="is">
            <value>Western</value>
    </rule>

    <rule field="playcount" operator="greater">
            <value>0</value>
    </rule>
    <order direction="descending">dateadded</order>

    <match>any</match>
    <limit>50</limit>

A play count greater than zero would be watched. Unwatched would be less than one.

The rule for playcount does not work for some reason. The rule for genreworks fine but the other rule is ignored and watched and unwatched are shown .

Perhaps you could add some detail into what skin your using and where your trying to get this to show up. I created the following widget and then made a new main menu item in the OSMC skin to point to it and it worked exactly as expected…

<node type="filter">
	<label>Unwatched Western</label>
	<content>movies</content>
	<order direction="ascending">sorttitle</order>
	<limit>50</limit>
	<rule field="genre" operator="is">
		<value>Western</value>
	</rule>
	<rule field="playcount" operator="lessthan">
		<value>1</value>
	</rule>
</node>

Thanks for your replies darwindesign. I’m using the OSMC skin. Where are you placing the xml file? I’m creating it in /usr/share/kodi/system/library/video/movies/.

I just tried your script and it works fine for me. Now I have to figure out what I’m doing wrong.

I placed your xml file in ~/.kodi/userdata/library/video/movies. The dir ref in my last post is wrong.

Anything you do in that folder you shouldn’t expect to stick around with updates.

That is where I pulled the xml file from but I didn’t manually create the xml file. With the skin set to Estuary I went into the movie library, clicked on the “…” at the top of the list (this might not be shown with some media view options), opened the side menu and selected node editor and then made a new node and stepped through the options I was looking for. I don’t think you can currently get to that exact menu from the My OSMC skin currently and you might need to figure it out with the node editor add-on if you don’t want to switch skins.

I previously created a custom xml file in ~/.kodi/userdata/library/video/movies to display newly added movies as a widget. It worked OK but it was showing watched as well as unwatched movies.

I copied my existing custom xml file from ~/.kodi/userdata/library/video/movies but I removed the “order” from . Also I was using a separate rule for every genre so I changed it to one rule with a new action for each genre like so;

Action Comedy Crime

After the changes above my movies widget now shows only newly added unwatched movies, just what I wanted. Thanks for your help.

1 Like