Nodes are defined views that are used to organize your media from the videos menu. In the past XBMC has had a number of standard nodes such as Title, Director, Year, Studios, Countries, Genres that were hard coded.
As of the latest post Eden Nightly builds, XBMC introduces the ability to customize these nodes using an XML file. Using XML files really gives great flexibility in how you display your media. Don't want your screaming kids stuff in your main movie node... exclude it. Want documentaries in a separate node, create it. Don't like how recently added is presented, change it.
1 The default Nodes
To understand this a little better, lets take a look at one of the default nodes. You can find these in:
And as an example lets take a quick look at the years.xml node in its simplest form:
<node order="3" type="folder"> <label>562</label> <path>videodb://1/3</path> <icon>DefaultYear.png</icon> </node>
As you can see we are using standard xml format here so nothing too complicated.
(The standard XBMC video nodes)
2 XML node components
Order = This is the order that you want to show the nodes. Starts at 1 for the top and goes sequentially so 2 will be the next node down.
Label = This is the text that will show for the node. In this case it is pointing to an ID in the strings.xml file (for transltion purposes) It can also just be any String you want, just type some text instead of the id number.
Path = This can be any valid XBMC path
Icon = Pretty self explanatory really, this is the icon that will show when the node is navigated over
3 Creating a Custom node
So now we understand how the default nodes work, lets have a look at making a custom node.
Create a new xml file in the same location as the default nodes. Lets call it Custom_Motor_dvds.xml
<node order="10" type="filter"> <label>(Custom) Motor DVDs</label> <path>videodb://1/3</path> <content>movies</content> <match>all</match> <icon>DefaultYear.png</icon> <rule field="path" operator="contains">//nas1/Videos/ExtremeSports/Cars</rule> </node>
As you can see we have a few more xml tags this time:
Match = Specifies how many rules should match. In this case we are matching all rules.
Rule = Any rule created with the smart playlist editor
(Custom node in action)
So there you have it, a simple path filter for our Motor DVDs. One thing that you may want to do now is edit your "Title" xml file to remove the motor dvds from the main movie library. You can do this by using the DoesNotContain operator:
<node order="2" type="filter"> <label>Movies</label> <path>videodb://1/3</path> <content>movies</content> <icon>DefaultMovieTitle.png</icon> <match>all</match> <rule field="path" operator="doesnotcontain">//NAS1/Videos/ExtremeSports/Cars/</rule> </node>
There are many other rules you can apply, a simple way to find them is to create a smart playlist. The possiblities are endless really. You could create a rule for all the database fields such as genre or year, use paths or combine rules together.
(Various custom video nodes)