runaddon onclick does not work
#1
My English is very bad to forgive for expressing myself badly

I am setting the confluence widget from xml with this code
xml:
<content sortby="lastused" sortorder="descending" target="addons" type="xml" limit="20">plugin://plugin.audio.radio_de</content>

but when loading the widget with
xml:
<onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
does nothing
I tested with this code
xml:
<onclick>PlayMedia($INFO[Container(ID).ListItem.FilenameAndPath])</onclick>

if it worked to reproduce but not to open the addon some idea of ​​what is my error
Reply
#2
I'm not 100% sure what you are trying to do, are you trying to open Radio stations from the Widget? Using Auto Widgets may be helpful to you https://forum.kodi.tv/showthread.php?tid=352934
Reply
#3
If i try to open radio from a widget written in xml
XML:
<control type="group">
                <left>190</left>
                <top>92</top>
                <visible>!Skin.HasSetting(HomepageHideWidgetRadios) + Container(9000).Hasfocus(108) </visible>
                <animation effect="fade" start="0" end="100" time="300" delay="350">Visible</animation>
                <control type="group">
                    <control type="label">
                        <description>Title label</description>
                        <left>-118</left>
                        <top>40</top>
                        <width>110</width>
                        <height>100</height>
                        <label></label>
                        <align>right</align>
                        <aligny>top</aligny>
                        <font>Regular18</font>
                        <textcolor>white</textcolor>
                        <shadowcolor>black</shadowcolor>
                        <wrapmultiline>true</wrapmultiline>
                    </control>
                    <control type="panel" id="8004">
                        <left>0</left>
                        <top>0</top>
                        <width>912</width>
                        <height>176</height>
                        <onleft>8004</onleft>
                        <onright>8004</onright>
                        <onup>600</onup>
                        <ondown>9000</ondown>
                        <scrolltime>200</scrolltime>
                        <orientation>Horizontal</orientation>
                        <include>RadiosLayout1</include>
                        <include content="radioNormal" />                                
                       <onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
                    </control>
                </control>
            </control>
Reply
#4
does $INFO[Container(ID).ListItem.Property(Addon.ID)] return anything if you use it in a label control?

also, check if there's anything in the Debug Log that might provide a clue.
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
#5
Returns nothing, Debug Log, or anything, does nothing when pressed
Reply
#6
ok, well there's you answer :-)
you're trying to use a listitem property that doesn't exist.
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
#7
So how could I launch the addon from the widget using RunAddon if there is some way
Reply
#8
well, you could hardcode the addon id.
..but what's the reason you want to override <onclick> ?
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
#9
I don't want to override the <onclick>.
I think I explained badly I would like to launch the addon from onclick
Reply
#10
adding an <onclick> tag to the container like you are doing:
xml:
<onclick>RunAddon($INFO[Container(ID).ListItem.Property(Addon.ID)])</onclick>
will override the default onclick behaviour that has been set for each listitem.

also see: https://kodi.wiki/view/Dynamic_List_Cont...ick_action
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
#11
So how should I put why I think that <onclick> is not if I put this code if it works
xml:
<onclick>PlayMedia($INFO[Container(ID).ListItem.FilenameAndPath])</onclick>
Reply
#12
well hardcoding the addon id will work
xml:
<onclick>RunAddon(plugin.audio.radio_de)</onclick>

another thing that *might* work is:
xml:
<onclick>ActivateWindow(music, $INFO[Container(ID).ListItem.Path])</onclick>
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
#13
Thank you very much it is already solved
xml:
ActivateWindow(music,$INFO[Container(ID).ListItem.FilenameAndPath])
Reply

Logout Mark Read Team Forum Stats Members Help
runaddon onclick does not work0