Posts: 14
Joined: Oct 2018
Reputation:
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
Posts: 12,455
Joined: Oct 2014
Reputation:
600
Thread moved to addon development
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2019-09-24, 12:14
(This post was last modified: 2019-09-24, 12:19 by spiff.)
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2019-09-24, 12:30
(This post was last modified: 2019-09-24, 12:31 by spiff.)
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.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
uhm, from a skin button you can activatewindow just fine. if that does not work, there is a nasty bug lurking.