How to get path as input value and use it? Confluence mod
#1
here is the problem:
I have created a small mod over confluence theme so I can have a new menu item RADIO. It includes hardcoded path to my radio m3u.
Code:
                    <item id="123333">
                        <label>RADIO</label>
                        <onclick>ActivateWindow(10501,&quot;smb://MYBOOKLIVE/Public/Shared Music/RADIO/&quot;)</onclick>
                        <icon>special://skin/backgrounds/radio.jpg</icon>
                        <thumb>$INFO[Skin.String(Home_Custom_Back_Radio_Folder)]</thumb>
                    </item>

I want to mod the skin yo be able to pop-up dialog with the file- system and select the location. I modded custom_SkinSetting_1111.xml, the fifth music add-on option to actually open DialogMediaSource.xml

Code:
                        <control type="button" id="425">
                            <width>750</width>
                            <height>40</height>
                            <font>font13</font>
                            <label>Click to add Radio folder path</label>
                            <label2>[COLOR=selected]$INFO[system.addontitle(Skin.String(HomeMusicButton5))][/COLOR]</label2>
                            <textcolor>grey2</textcolor>
                            <focusedcolor>white</focusedcolor>
                            <texturefocus>MenuItemFO.png</texturefocus>
                            <texturenofocus>MenuItemNF.png</texturenofocus>
                            <onclick>ActiveWindow(129)</onclick>
                        </control>

I am looking for the method that will allow me a path to be stored as a string in some of the userdata files so i can later use it in my Home.xml entry. I suppose it is something like Skin.SetSOMETHING() but cant find what it isSad
Reply
#2
skin.setpath() may be what you're looking for.

check http://wiki.xbmc.org/index.php?title=Lis..._functions
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Will check it out, though the wiki talks about images only
Reply
#4
(2012-12-29, 23:44)deckoff Wrote: Will check it out, though the wiki talks about images only

for files:


Skin.SetFile(stringname,extensions,start path)

example:

Skin.SetFile(Startup_Playlist_Path,.m3u|.xsp,special://profile/playlists/music/)


do not open DialogMediaSource manually. that won´t work.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
(2012-12-30, 00:58)phil65 Wrote:
(2012-12-29, 23:44)deckoff Wrote: Will check it out, though the wiki talks about images only

for files:


Skin.SetFile(stringname,extensions,start path)

example:

Skin.SetFile(Startup_Playlist_Path,.m3u|.xsp,special://profile/playlists/music/)


do not open DialogMediaSource manually. that won´t work.

Now, I am looking for a path. The path contains m3u, but I need the path only Smile
Reply
#6
So you have multiple playlists under smb://MYBOOKLIVE/Public/Shared Music/RADIO/ and you want to list the contents of this directory?

Skin.SetPath should work, i don't know why both the wiki and XBMC itself states while browsing for the directory that it's for images.

Or you could use script.favourites to do this:

- First add the wanted directory to favourites, then
- Settings: <onclick>RunScript(script.favourites,property=RadioTarget)</onclick>
- Home: <onclick>$INFO[Skin.String(RadioTarget)]</onclick>
Reply
#7
- Skin: Skin.SetPath(string[,value])
- Home: <onclick>$INFO[Skin.String(RadioTarget)]</onclick>

This worked!
I have another problem, though.
- I cannot install zips from file via the add-on option I get an error that the structure is invalid. I use the stable XBMC installed via the Ubuntu 12.04 repo :, XBMC:11.0 git unknow, buid 24.04.2012. Neither mine, nor any other skin I download is able to install.
I think there might be a problem with the exact build, I will try with a nightly build and see what happens
Reply
#8
(2013-01-01, 15:20)deckoff Wrote: - Skin: Skin.SetPath(string[,value])
- Home: <onclick>$INFO[Skin.String(RadioTarget)]</onclick>

This worked!
I have another problem, though.
- I cannot install zips from file via the add-on option I get an error that the structure is invalid. I use the stable XBMC installed via the Ubuntu 12.04 repo :, XBMC:11.0 git unknow, buid 24.04.2012. Neither mine, nor any other skin I download is able to install.
I think there might be a problem with the exact build, I will try with a nightly build and see what happens

rezip it yourself, you can't install github zips for some reason
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
How to get path as input value and use it? Confluence mod0