Reputation: 628
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:
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:
<setting label="30013" type="addon" id="actaddon1" addontype="xbmc.plugin.video" visible="eq(-3,2)" enable="eq(-7,true)" />
The 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:
<favourite name="LIVE" thumb="C:/Users/joachim.prinsloo/AppData/Roaming/Kodi/addons/plugin.video.cbsn/icon.png">PlayMedia("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&mode=GV")</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 extremely hard to find.
Upvotes: 0
Views: 1182
Reputation: 4302
I think screensaver.plugin.slideshow does something similar.
You might want to have a look at this likely: https://github.com/ruuk/screensaver.plugin.slideshow/search?utf8=%E2%9C%93&q=choosestream
Upvotes: 0