v19 Custom Category Node List
#1
@jjd-uk 
Apologies to call upon on your assistance so quickly again, but was hoping you might be able to offer some feedback on a problem I came across some time ago.
I've created a couple of new widgets on my 'Movies' home screen section (My Watchlist and 4K) and also created 2 new nodes for these that appear in the Category list at the top of the screen. Everything works fine and as expected. However, if I install the skin mod on another machine is when I hit a snag. Whilst both the widgets work, the nodes in the category list do not. 
According to the home.xml, the 'Movies' category list seems to be located in the Userdata 'Library' folder:-
xml:
<include content="WidgetListCategories" condition="Library.HasContent(movies) + !Skin.HasSetting(home_no_categories_widget)">
                            <param name="content_path" value="library://video/movies/"/>
                            <param name="additional_movie_items" value="true"/>
                            <param name="widget_header" value="$LOCALIZE[31148]"/>
                            <param name="widget_target" value="videos"/>
                            <param name="list_id" value="5900"/>
</include>
 
I thought perhaps I could just point this category list directory on the 2nd line above to a new location within the skin itself, maybe the extras folder, but that doesn't seem to work either. Would you have any suggestions on how I might be able to solve this problem? My own feeling is that nodes have to always be located in the userdata location, so maybe it's not possible....
As always, any feedback would be very much appreciated.
Cheers
Reply
#2
The nodes files MUST be in one of 2 locations, these are system provided ones withiin the Kodi installation folder under system/library and user provided ones under userdata/library. That Library path is a hardcoded URL that always points to those library folders in system & userdata, so the node files cannot go anywhere else.

So library://video/movies/ means Kodi will always look at both system/library/videos/movies and userdata/library/videos/movies for the node xml files and will aggregate them togerther to produce the node list, if there's 2 nodes named the same under the same equivalent path e.g. there is a system/library/videos/movies/titles.xml and userdata/library/videos/movies/titles.xml, then Kodi will prefer the one in the userdata location.

So for a skin which points to custom nodes then those custom nodes must also be moved across to the userdata/library/ on each install the skin is used on.
Reply
#3
Cool. That's a great explanation. 
I suspected that might be the case, but did wonder if there was some clever trick I was missing. At least I don't need to spend anymore time on the issue.
Maybe I will just provide an external link to download these custom nodes for users who want to include them in this skin when the time comes.
Thanks again
Reply
#4
I'm not sure as I've never tested it, but using path substiuation may work,
so something like:

xml:
<advancedsettings>
<pathsubstitution>
<substitute>
<from>special://userdata/library/</from>
<to>special://home/addons/skin.estuary/extras/library/</to>
</substitute>
</pathsubstitution>
</advancedsettings>

But obviously this still means something needing to be done on each install. Although if you are likely to be tweaking the nodes then this might mean they can be included with the the skin.

More on this at https://kodi.wiki/view/Path_substitution and https://kodi.wiki/view/Special_protocol

[edit] On the Special Protocol page I've only just noticed that library://video/ is listed there could be a possibility that something like

xml:
<advancedsettings>
<pathsubstitution>
<substitute>
<from>library://video/</from>
<to>special://home/addons/skin.estuary/extras/library/video</to>
</substitute>
</pathsubstitution>
</advancedsettings>

may work. However that could mean the system nodes may also need to be moved to that path, if it works at all.
Reply
#5
Great stuff!  Smile
I will give this a try!   
Cheers
Reply
#6
If you wish to verify paths Kodi will use particularly when it comes to the special protocol paths, then just add them in File Manager to determine the exact location on the file system it will take you to.

For example the Special Protocol page lists special://home to take you to the Kodi folder that contains all user information/data, within that folder is the addons subfolder where the user intalled addons folder go, so you can extend those special paths by adding the current subfolder path such as special://home/addons or special://home/addons/skin.estuary etc etc.
Reply
#7
Hi @jjd-uk 
I tried your suggestion, but no luck unfortunately.
Thanks for the suggestion anyway.
Cheers
Reply

Logout Mark Read Team Forum Stats Members Help
Custom Category Node List0