Quick Inquiry - Opening Library Source Folder from Main Menu
#1
Trying to tweak something in my custom Kodi skin to activate network share folders from the main menu for general folders I put Movie Trailers, cartoons, random videos etc into. Currently I have a menu entry in the Includes_Home.xml with this string that works 

<onclick>ActivateWindow(videos,"smb://KODISERVER/D/Movie Trailers/",return)</onclick>

What I'd like to do is eliminate the smb path direct part and open a folder from the Kodi sources where I have added that same smb folder "Movie Trailers" type set to 'none". I've tried reading the skinning manual for a string that would work and couldn't come up with anything so any tips would be great. I have tried a few things such as below but thus far only opened the main Sources folder.

<onclick>ActivateWindow(Videos,Files/Movie Trailers,return)</onclick>

<onclick>ActivateWindow(Videos,Files,Movie Trailers,return)</onclick>

With this change if I ever change the folder location I only need to update the source location in each Kodi client install and not update the Includes_Home.xml in the skin itself.

Thanks!
Reply
#2
What you want to do won't work because a source is just a file path.

I think what you're probably looking for instead is a video node:
https://kodi.wiki/view/Video_nodes

If you make a video node pointing towards your source path, then in the skin you can point towards your node path. Then you only need to update the path in the node file rather than the skin.

You can do that from inside Kodi using the Library Node Editor addon.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
I'm hoping for a simpler solution without requiring additional add-ons. This is to implement across close to 10 Kodi setups in multiple networks. At the moment I have to edit each xml file for the specific network to capture the right network location. Adding sources to each Kodi install is easy and having 1 line of code in the xml reduces additional work. This is also for use with 4 different network directories and would be easily scalable.

Just wanted to know if there is a string that will open a specific source folder and not just the general sources menu.

Or is using a playlist might work? My custom skin uses lots of playlists for all sorts of cool organizational things.

Even better would be the ability to use a JellyFin library as the source and then the whole process becomes mobile.
Reply
#4
(2024-01-29, 23:08)K0D1User1138 Wrote: Even better would be the ability to use a JellyFin library as the source and then the whole process becomes mobile.

if you want to use jellyfin libraries in kodi, just install the Jellyfin for Kodi addon and sync your libraries, the whole thing takes less than 5m
- https://jellyfin.org/docs/general/clients/kodi/

(not JellyCon)
Reply
#5
(2024-01-29, 23:13)izprtxqkft Wrote:
(2024-01-29, 23:08)K0D1User1138 Wrote: Even better would be the ability to use a JellyFin library as the source and then the whole process becomes mobile.

if you want to use jellyfin libraries in kodi, just install the Jellyfin for Kodi addon and sync your libraries, the whole thing takes less than 5m
- https://jellyfin.org/docs/general/clients/kodi/

(not JellyCon)
I already use JellyFin for my library. This isn't a method of viewing my Movies and TV Shows, this is for dynamic folders for content I add and remove that doesn't require being scraped. One folder is Movie Trailers for movies that are "coming soon". Another is for cartoon shorts like Mickey Mouse and Tom & Jerry. Another is just random video content that doesn't go anywhere particular but I like having at hand to watch. SNL David S. Pumpkins sketches to name a few.

I've been using JF to manage my media library for over a year and a half now and love it, save for a few hiccups that I've not yet seen worked out. In my JF server I also have these dynamic folders as options but again, they aren't for any regular scraped content and can be changed at anytime, like adding the Ghostbusters: Frozen Empire Theatrical Trailer earlier today. Just put it in the folder and done.

I'm hoping ion my custom sin to remove the direct smb path to these folders and instead use the Kodi library sources which I can add these folders as "none" types. Or to add the dynamic libraries from my JF server. Either or, to streamline the skin code and make it universal across multiple Kodi installs I have and maintain.
Reply
#6
(2024-01-30, 04:01)K0D1User1138 Wrote: I'm hoping ion my custom sin to remove the direct smb path to these folders and instead use the Kodi library sources which I can add these folders as "none" types. Or to add the dynamic libraries from my JF server. Either or, to streamline the skin code and make it universal across multiple Kodi installs I have and maintain.

it would have helped if i had read the first post, now that i have ...

you have these non-scraped libraries in the jellyfin "server" right?

- if yes
--can they be viewed in the jellyfin addon for kodi, if you actually go to the addon from video addons?
--if yes
---open the context to an entry in the addon, add it to your favorites, open the favorites.xml and use that path in the skin for a link to the jellyfin libraries

-if no
--add a library to jellyfin, content type "Photos" (yes, photos works for videos), using the photos type will allow this type of random video library without scrapers/scraping
--then you can do the above because it should be a link in the jellyfin addon after that
Reply
#7
(2024-01-30, 04:12)izprtxqkft Wrote:
(2024-01-30, 04:01)K0D1User1138 Wrote: I'm hoping ion my custom sin to remove the direct smb path to these folders and instead use the Kodi library sources which I can add these folders as "none" types. Or to add the dynamic libraries from my JF server. Either or, to streamline the skin code and make it universal across multiple Kodi installs I have and maintain.

it would have helped if i had read the first post, now that i have ...

you have these non-scraped libraries in the jellyfin "server" right?

- if yes
--can they be viewed in the jellyfin addon for kodi, if you actually go to the addon from video addons?
--if yes
---open the context to an entry in the addon, add it to your favorites, open the favorites.xml and use that path in the skin for a link to the jellyfin libraries

-if no
--add a library to jellyfin, content type "Photos" (yes, photos works for videos), using the photos type will allow this type of random video library without scrapers/scraping
--then you can do the above because it should be a link in the jellyfin addon after that
In my JF server I have all these folders setup, yes.

In JF-Kodi I can see 2 of them, not all. I followed your second suggestion of adding one of the libraries to favourites, copied the action and added that to my Includes_Home.xml. That works.

However, it's slower than direct folder access, which I can understand, and it doesn't return files by file name but rather drops anything after a date in parenthesis. So in my Movie Trailers I can only see the movie name and not the details of the trailer because that comes after the (YEAR). Now I can fix that by entering the name I want into each trailer in the JF server metadata. But that information doesn't save to the actual file metadata so it's not transferable.

Another issue if the JF server doesn't want to just show ALL items in these folders and for some reason chooses to leave out certain files. I have a sub-folder of Star Wars trailers and there are 5 trailers for A New Hope but JF only shows 3. Again 5 for Empire but JF only shows 2. I don't understand why that is happening at all. Unrelated to Kodi specifically but does add to some of this issue.

And then my Cartoons JF library doesn't show up in JF as a dynamic folder anyways. So that doesn't help that situation. In my JF server it is setup the same as Movie Trailers and Videos, as a Mixed Movies/Shows folder.

I took your suggestion of creating a JF server Photos library and used my Movie Trailers folder to test. It worked to find the 'random' videos and include the poster art but like before it didn't add ALL items for some reason. But now at least it shows the file name and doesn't drop part of it after (YEAR). I go back into Kodi JF and that new library does not appear. I'm not sure what to do in JF-Kodi to get it and anything else that's missing to appear.

All of this, when working, is good for my laptop install of Kodi because I take that around with me and now could access these local folders remotely from within Kodi. But it still requires editing the Includes_Home.xml file specific to my media server and isn't universal to my friend's setup as I still must edit his XML with his JF information so for anything on the LAN that won't be moved to use elsewhere I'm better off just leaving the direct SMB path in the XML.

It's good to learn some of these things, even if they aren't to final solution to my inquiry. Overall these extra folders can still be accessed remotely through JF itself even if not from within Kodi. Though I may be adding a second remote location to my home media server and now being able to just use Kodi and not switch to JF is a benefit, if I can figure out why I can't see all the libraries properly.
Reply
#8
(2024-01-30, 06:20)K0D1User1138 Wrote: I go back into Kodi JF and that new library does not appear.

just retested mine, libraries in the Jellyfin addon (when opened from video addons) works perfectly for me - when adding a library it shows up in kodi, when removing it it disappears
- did you ensure the user has access to that library? dashboard -> users -> (username) -> Access

testing on jellyfin server 10.8.13 addon version 0.7.11+py3 kodi version Kodi (21.0-ALPHA1 (20.90.101) Git:20230321-124023d6ff). Platform: Linux x86 64-bit

server not finding files is strange, it seems to work fine on mine with subfolders, i just tried some variations and it does populate the way it should

jellycon* can live side by side with jellyfin and i suppose would provide the same functionality as copying paths out of the jellyfin addon, possibly try that and see if you get better results

the rest of the jellyfin problems i would take to their forum

-----

completely understandable if this is too slow to be usable, as far as the initial post i don't have recommendations for smb paths or such, my Kodi instances don't have access to that sort of thing because i only use them with jellyfin
Reply
#9
(2024-01-30, 08:43)izprtxqkft Wrote: - did you ensure the user has access to that library? dashboard -> users -> (username) -> Access

Image

Sometimes the simplest explanation is the cause of a lot of frustration. Turned on access for that user and yes, the now accessible libraries are available in Kodi-JF. 

So now my understanding on how to handle my OP for remote Kodi-JF access as been answered and it is possible. It leaves me to decide if I use those libraries as I have initially set them up, as Mixed Movies/Shows, and then manually deal with renaming everything within the JF server metadata, or to replace those libraries with ones setup as Photos which will save me the rest of the time and is also transferable to other JF/Kodi setups I maintain. I'm leaning to the latter but that's for another day.

Locally this solution still requires manually editing the Include_Home.xml for each specific server setup so it doesn't really solve my OP and functions in a slower and more cumbersome process than just having direct SMB paths. Still hoping there is an actual Kodi skin string that can easily open a Kodi database folder directly.

And still no idea why JF doesn't like some of my Star Wars trailers. Unrelated to Kodi itself but just strange it won't return EVERYTHING in a folder no matter what. When I use the Kodi direct SMB path option I see every trailer. Just a strange behavior.

I do appreciate the help and gained knowledge. Gives me more and more ideas on things I can do with all of this stuff.
Reply
#10
(2024-01-30, 14:56)K0D1User1138 Wrote: Still hoping there is an actual Kodi skin string that can easily open a Kodi database folder directly.

As I said before, no, because a source is simply a file path. You must know the path. Again, if you want a **shortcut** to a path, then what you want is a **node**.

So much of an unnecessary wild goose chase in this thread. What you want to do is extremely simple with a library node

1. Create a folder for your node in /kodi/userdata/library/ and then make a blank xml file inside:
e.g. kodi/userdata/library/mynodes/mycoolnode.xml

2. Open the node file you made in a text editor and add:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="40" type="folder">
<label>My Cool Node</label>
<icon>DefaultFolder.png</icon>
<path>Path/to/your/source/folder/goes/here</path>
</node>

3. Now setup your skin to access this node with:
xml:

ActivateWindow(videos,library://mynodes/mycoolnode.xml/,return)

Done. That's it.

When you want to change the path you just edit the node xml file and change the path then drop the new file into the userdata folders. No skin edits required. No addons required. It is essentially exactly the same process as you were planning to do with sources.xml
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#11
(2024-01-31, 09:16)jurialmunkey Wrote:
(2024-01-30, 14:56)K0D1User1138 Wrote: Still hoping there is an actual Kodi skin string that can easily open a Kodi database folder directly.

As I said before, no, because a source is simply a file path. You must know the path. Again, if you want a **shortcut** to a path, then what you want is a **node**.

So much of an unnecessary wild goose chase in this thread. What you want to do is extremely simple with a library node

1. Create a folder for your node in /kodi/userdata/library/ and then make a blank xml file inside:
e.g. kodi/userdata/library/mynodes/mycoolnode.xml

2. Open the node file you made in a text editor and add:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="40" type="folder">
<label>My Cool Node</label>
<icon>DefaultFolder.png</icon>
<path>Path/to/your/source/folder/goes/here</path>
</node>

3. Now setup your skin to access this node with:
xml:

ActivateWindow(videos,library://mynodes/mycoolnode.xml/,return)

Done. That's it.

When you want to change the path you just edit the node file in userdata and change the path. No skin edits required. No addons required.

You said before to use the Library Node Editor Addon. IF that is just an addon to edit the nodes which can be done as you described above then your direction was a bit unclear as I took it to understand an addon was required to add to Kodi.

And I don't feel this has been a wild goose chase as I learnt about adding my JellyFin folder libraries to my skin for remote access as well as solved an issue I had in JellyFin itself not populating all the files in a folder (because files ending in 'trailer' are seen as trailer files for other media instead of their own files so I added ' 1' to them and now they all populate). 

I will look at your above solution after I've had some sleep. Thanks for the info.
Reply
#12
(2024-01-31, 09:16)jurialmunkey Wrote:
(2024-01-30, 14:56)K0D1User1138 Wrote: Still hoping there is an actual Kodi skin string that can easily open a Kodi database folder directly.

As I said before, no, because a source is simply a file path. You must know the path. Again, if you want a **shortcut** to a path, then what you want is a **node**.

So much of an unnecessary wild goose chase in this thread. What you want to do is extremely simple with a library node

1. Create a folder for your node in /kodi/userdata/library/ and then make a blank xml file inside:
e.g. kodi/userdata/library/mynodes/mycoolnode.xml

2. Open the node file you made in a text editor and add:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="40" type="folder">
<label>My Cool Node</label>
<icon>DefaultFolder.png</icon>
<path>Path/to/your/source/folder/goes/here</path>
</node>

3. Now setup your skin to access this node with:
xml:

ActivateWindow(videos,library://mynodes/mycoolnode.xml/,return)

Done. That's it.

When you want to change the path you just edit the node xml file and change the path then drop the new file into the userdata folders. No skin edits required. No addons required. It is essentially exactly the same process as you were planning to do with sources.xml

I followed your guide and made the node xml file and added the activate string to my Kodi skin. It works! Great. Accept 1 issue.

These folders generally have poster images along with the videos. Generally this returns just a listing of the videos by name with the poster image used in place of the default type image. When I open a folder through the node method the list is populated with both image and video files. If I move into the next sub-folder the typical result of just video files listed with images taken from the '-poster- files. I can go back up to the root folder (as directed to via the node) and the poster image files are no longer listed. Return to the main menu and then go back into the folder and it's a repeat of the previous, both image and video files listed.

Of course I would like to eliminate seeing the image files listed in the first screen. Any idea why this may occur and how to prevent it?
Reply
#13
(2024-02-01, 05:03)K0D1User1138 Wrote: These folders generally have poster images along with the videos. Generally this returns just a listing of the videos by name with the poster image used in place of the default type image. When I open a folder through the node method the list is populated with both image and video files. If I move into the next sub-folder the typical result of just video files listed with images taken from the '-poster- files. I can go back up to the root folder (as directed to via the node) and the poster image files are no longer listed

Of course I would like to eliminate seeing the image files listed in the first screen. Any idea why this may occur and how to prevent it?

I see what you mean. I hadn't tested with artwork files originally. It seems like a bug as Kodi should register the artwork and will do so properly once the container refreshes (e.g. what you're seeing going back).

As a workaround you can force a Container.Refresh immediately after activating the window by delaying the command with a silent AlarmClock like so:

xml:

<onclick>ActivateWindow(videos,library://path/to/your/node.xml/,return)</onclick>
<onclick>AlarmClock(refresh,Container.Refresh,00:00,silent)</onclick>

00:00 for timing worked well for me testing with Estuary, but in the slim chance it doesn't for you, then try a one second delay (00:01) instead.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#14
That seemed to work. I will keep testing. Thanks for the help!
Reply

Logout Mark Read Team Forum Stats Members Help
Quick Inquiry - Opening Library Source Folder from Main Menu0