executebuiltin in kodi 18
#1
hi,
in kodi 17 to open another addon from alist i add an item to the list as playable and then in that mode i added the code:

xbmc.executebuiltin(('ActivateWindowAndFocus(10025,"plugin://plugin.video.youtube",return)'))

but for some reason in kodi 18 it gets to some kind of loop open the same list over and over again .

any idea why and how can i fix that?

another problem i am having is with the :
xbmc.executebuiltin(('XBMC.PlayMedia
also some sort of loops and crushs.

please help.
thank you very much
Reply
#2
Thread moved to addon development
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
use single opening and closing brackets.
if that doesn't fix it, check the Debug Log.
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
#4
(2019-09-23, 18:07)ronie Wrote: use single opening and closing brackets.
if that doesn't fix it, check the Debug Log.

hi,
thanks for your replay.
it didnt helped.
at the log there is nothing just the same mode over and over again.
how can i open an addon from another addon in kodi 18?
thamks ahgain
Reply
#5
i'm not sure, as i'm not really familiar with our plugin system.
in my understanding, plugins should not try to do those things in the first place... but i could be wrong.

perhaps @spiff can lecture us one more time on what plugins can and can't do.
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
#6
Sad 
(2019-09-23, 21:02)ronie Wrote: i'm not sure, as i'm not really familiar with our plugin system.
in my understanding, plugins should not try to do those things in the first place... but i could be wrong.

perhaps @spiff can lecture us one more time on what plugins can and can't do.
i know for a fact that it works in kodi 17 , wonder why not on 18...
Reply
#7
a plugin is a virtual filesystem. it is NOT a generic script.

- if an entry is a file and marked playable, it is expected to be playable and to return an url through setResolvedUrl.
- if something is a file but not marked playable, it can do actions, then finish with an endOfDirectory call.
- if something is a directory it is expected to return a directory listing.
Reply
#8
(2019-09-24, 08:42)spiff Wrote: - if something is a file but not marked playable, it can do actions, then finish with an endOfDirectory call.

if the plugin activates another window, i assume the plugin will abort abruptly and the endOfDirectory will never be received by kodi?
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
yeah i think shit will meet fan in that case, though i have not checked how the code works precisely these days. i know you can open dialogs fine (e.g. settings), things like that was the intended use case.

in any case, if you want a item to take you to the youtube plugin, the way to do that is to return a directory with the path set to plugin://plugin.video.youtube/ - not activatewindow.
Reply
#10
(2019-09-24, 11:01)spiff Wrote: yeah i think shit will meet fan in that case, though i have not checked how the code works precisely these days. i know you can open dialogs fine (e.g. settings), things like that was the intended use case.

in any case, if you want a item to take you to the youtube plugin, the way to do that is to return a directory with the path set to plugin://plugin.video.youtube/ - not activatewindow.
first of all , thanks alot for your replay.
but what if i want to not just open the addon but to sent it paramters?

plugin://plugin.video.youtube/?action=play_video&videoid=

thanks
Reply
#11
that's a playable file. you return an entry, with that url, set isFolder = false on the item and set the is_playable property on it.

when the item is clicked in the ui, kodi then does a callback to the youtube plugin to resolve to the playable url. ie first point in my initial post.
Reply
#12
(2019-09-24, 12:14)spiff Wrote: that's a playable file. you return an entry, with that url, set isFolder = false on the item and set the is_playable property on it.

when the item is clicked in the ui, kodi then does a callback to the youtube plugin to resolve to the playable url. ie first point in my initial post.

thanks alot , i will try that.
i have one more question do you know of aproblem with the setting in kodi 18?
if there are alot of categories you cannot navigate it jumps all around, in kodi 17 it works great.
thanks again
Reply
#13
i'm (informed) guessing at what the problem is;

the settings implementation was completely rewritten. the backwards compatibility code only semi-works. i'd recommend updating to the new format.
Reply
#14
(2019-09-24, 12:30)spiff Wrote: i'm (informed) guessing at what the problem is;

the settings implementation was completely rewritten. the backwards compatibility code only semi-works. i'd recommend updating to the new format.

ok, thanks again.
one last question what if i want to run the youtube addon throw skin shortcut, the problem here is that every skin shortcut is defined as Playable which cause the loops in kodi 18, how can i solved that?
thanks again.
Reply
#15
uhm, from a skin button you can activatewindow just fine. if that does not work, there is a nasty bug lurking.
Reply

Logout Mark Read Team Forum Stats Members Help
executebuiltin in kodi 180