Linking Main Menu Items To Specific Location [SOLVED]
#1
Hello Everyone,

I was wondering if there is any way to link an item from your main menu to a specific path located on a hard drive.
I have been diving into learning more about the xml coding and I have seen that you can change / link some things differently to the <onclick> tag using commas or // etc. but I have not come across anything like what I am looking for yet, where you can link to a folder location outside of Kodi commands / Kodi file folders.

For example lets say you have "MUSIC" as your main menu item.
Your music is located in C:\Media\Songs
You want your music category to start in the "Songs" folder located on your hard drive as opposed to the default Kodi location.

Thank you to anyone for reading this and for any help offered.
Reply
#2
I think this would be more beneficial under the skins category, specifically whichever skin you are trying to modify.
Reply
#3
Thank you for your response

Yeah I really wasn't sure where to post this question.

The skins section is sectioned by skin names but this question isn't necessarily aimed at a particular skin.

I was going to put it it in the skin development section because my goal is that I might use this for a skin I may try to create in the future, but it kind of doesn't really fit there either.

If anyone has anything else they would like to share I would appreciate it.
Thank You
Reply
#4
Not sure i understand what your trying to do here?

If you simply want to add a different source as music then why not just add the source location you want?

If you mean splitting the library by source of files then that can be done by use of smart playlists and use of skins that allow adding these to main menu, of which there are many.
Reply
#5
Sorry, just reread your next post.

If it is either of things in last post I did that your after then maybe have a nose around other skins?
Reply
#6
Here is a further explanation of what I am looking to accomplish.
Hopefully someone will take the time to read all of this and can help point me in the right direction.
I apologize if I am missing something simple.

Basically in Kodi when you select for example "PICTURES" from the main menu it brings you into "MyPics.xml" which is the "PICTURES" categories starting point.

There you may find the following items in a list

CATS (added source)
PICTURES ADD-ONS
TIGERS (added source)
USB (If you have a USB flash drive for example plugged in)
ZEBRAS (added source)

I don't really like how my "added source" folders are in the same list with these two items
PICTURES ADD-ONS
USB

I won't be using these two items from this list, I have no "PICTURE ADD-ONS" and I will probably view "USB" items within the file manager.

I am looking to either.....

1.) Hide these two items from showing up in the list
Which I thought I read something somewhere about being able to do this from the "AdvancedSettings.xml"Huh

OR

2.) Be able to have my "PICTURES" main menu item be linked to a folder one level deeper so those items are not seen.

So the "PICTURES" starting point list would be

MY PICTURES FOLDER (added source that contains sub sources CATS, TIGERS, ZEBRAS within it)
PICTURES ADD-ONS
USB

Have it setup so that when I enter the "PICTURES" category it would go to "MY PICTURES FOLDER" and I would just see the following sources in a list
CATS
TIGERS
ZEBRAS

I came across the following code item which I think may be what I am looking for, it says that you can place a source from the "Sources.xml" file within the "dir" but I can't seem to understand how to use it correctly, because there is no example shown.

CODE
ActivateWindow(window[,dir,return])

CODES TRIED

ActivateWindow(Pictures[,C:\MY PICTURES FOLDER,return]) Didn't work
ActivateWindow(Pictures[,MY PICTURES FOLDER,return]) Didn't work
ActivateWindow(Pictures[,MY PICTURES FOLDER,]) Didn't work
Etc. Etc. Etc. you get the idea, they all didn't work

Thank You to anyone who read all of this and for any help provided.
Reply
#7
I'm using the artic zephyr skin so things might be different.

The below goes straight to the source between the speech marks.
The 10002 I'm guessing is reference to the xml being used to view the source. Might work if use mypics.xml instead.

ActivateWindow(10002,"/home/rich/Pictures/2014/",return)

Hope that helps.
Reply
#8
Just tried using mypicsdb instead of 10002 and it doesn't work.
Guess you need to use the number reference relevant to skin.

Like I said, the above works in artic zephyr skin so could try skin out to see if get any clues.
Reply
#9
Thank You for your responses and for sticking it out with me Boyofford.

I have found out how the coding works to link to a specific folder which I will share just in case someone in the future desires to do this.

ActivateWindow(category name here,location path on your hard drive here,return)

For Example
ActivateWindow(music,C:\Music,return)

Note:
You have to add the location path as a source before this code will recognize it.
Also once you add this code, it is a good idea to close and then restart Kodi.

Hope this helps others in the future.
Reply

Logout Mark Read Team Forum Stats Members Help
Linking Main Menu Items To Specific Location [SOLVED]0