Browse for plugin/addon dialog - kodi custom addon settings.xml
#1
Hi all,

I am busy building a plugin for myself for my xbmc/kodi media center running on a raspberry pi. The plugin is an alarm clock which will execute certain actions at a user set time. Pure and simple. The actions that I would like to be able to take place for a start is the following:

Play a file - check Play a URL Play a playlist - check play an addon (and/or favorite) - problem I would like to avoid adding the plugin to the favorites first before accessing it through my alarm clock. It would be a lot more user friendly if you can select the addon from the alarm clock settings itself. and it saves that url in the settings file. The problem is, I cannot seem to find the correct way to specify a control in the settings xml to browse addons.

I have tried the following:

Code:
<setting label="30013" type="addon" id="actaddon1" addontype="xbmc.plugin.video" visible="eq(-3,2)" enable="eq(-7,true)" />

problem here is I am not sure how to specify the addontype for video and music addons. The code above runs but when trying to select anything just does not open any dialogs.

The textbox for the play file works which opens a browse dialogue and the Play URL box opens the keyboard. The problem is how do I open a dialog to browse for a plugin?

Example of what I would like to choose in this setting:

If you download the CBSN addon for xbmc/kodi and open it, you will be presented with a list of on-demand videos as well as their live stream at the top of the list. If you select the LIVE item at the top of the list, it will open and start playing their live stream. I would like to choose this live item by browsing to it directly from the configuration of my alarm clock plugin and store that url in the settings file. When the alarm executes, it opens that stream from the plugin and starts plying the stream. I am pretty sure that I am just missing a type or something in the code above but I cannot find it documented anywhere and the quest to try and find a plugin with the same functionality to check out the code came up fruitless.

If it helps, you can add the CBSN list item to the kodi favorites which I have noticed, stores this item in the favorites file:

Code:
<favourite name="LIVE" thumb="C:/Users/joachim.prinsloo/AppData/Roaming/Kodi/addons/plugin.video.cbsn/icon.png">PlayMedia(&quot;plugin://plugin.video.cbsn/?url=http%3A%2F%2Fcbsnewshd-lh.akamaihd.net%2Fi%2FCBSN_2%40199302%2Findex_4000_av-b.m3u8%3Fsd%3D10%26rebase%3Don&amp;mode=GV&quot;)</favourite>

If I have to use the favorites and someone can direct me as to how to launch the favorites dialog, that would not be the end of the world, but as I said, I would prefer if I can browse to the item directly without having to add it to the favorites list first. Just one less step to worry about and more user friendly. I could add a Play favorite option as well. Now that would be cool :-D

I know a favorites browser can be launched from the AEON NOX skin when setting up the Menu. When selecting the action, you can browse to a favorite but once again, I am not sure how to launch this dialog from a settings.xml file and documentation to this is like diamonds... extremely hard to find.

I appreciate any help on this issue. Google is so vain... I mean vague sometimes.

Thanks
J
Reply
#2
(2015-11-18, 12:16)joachimpr Wrote: The problem is, I cannot seem to find the correct way to specify a control in the settings xml to browse addons.

I have tried the following:

Code:
<setting label="30013" type="addon" id="actaddon1" addontype="xbmc.plugin.video" visible="eq(-3,2)" enable="eq(-7,true)" />

problem here is I am not sure how to specify the addontype for video and music addons. The code above runs but when trying to select anything just does not open any dialogs.

see: http://kodi.wiki/view/Addon.xml#.3Cextension.3E

"xbmc.addon.video" will list all video addons
"xbmc.addon.audio" will list all music addons
"xbmc.python.pluginsource" will list all video/audio/picture/program plugins
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
Hi ronie,

Thanks so much for this. It *almost* worked. It brings up the addon browser but I cannot seem to navigate into the addon to be able to pick a source such as "LIVE" on the CBSN addon although I can pick the plugin in its entirity which is no use. As I have read on the link you provided, this functionality should be provided by using "xbmc.python.pluginsource" correct? could it be that the CBSN plugin did not include the following:

Code:
<extension point="xbmc.python.pluginsource"
          library="myscript.py">
  <provides>image video</provides>
</extension>

as stated here: http://kodi.wiki/view/Plugin_sources#Wha...our_add-on

If this is not possible to do (which I think should be as you can directly choose the LIVE source from this plugin and add it to your favorites) do you perhaps have any tips on which control /xml tag to use in the settings.xml file to browse to your favorites? I cannot seem to find this extension in the list to which you linked. Unless I am missing something again.

I thank you so much for your help. you have no idea how much it is appreciated.

Thanks
J
Reply

Logout Mark Read Team Forum Stats Members Help
Browse for plugin/addon dialog - kodi custom addon settings.xml0