How to open window and send parameters?
#1
Once list item is chosen, I would like to open window and send some parameters. How should I do it?
The following code works:
Code:
listitem.addContextMenuItems([ ('Test', 'ActivateWindow(Karaoke)')])
The question is about parameters. In C++ it looks like below:
Code:
window->newSong( m_Lyrics );
How should I do the same in my addon? Looks like Control.Message could help, but I don't understand how to (1) pass both command to addContextMenuItems, (2) pass additional parameters (m_Lyrics) to newSong command.
Reply
#2
usually you have parameters in the call to your addon.
Code:
plugin://plugin.video.youtube/play/?video_id=


Code:
entries = []
entries.append( ( show_comment_txt , "XBMC.Container.Update(%s?path=%s?prl=zaza&mode=listLinksInComment&url=%s)" % ( sys.argv[0], sys.argv[0], urllib.quote_plus(site) ) ) )            

entries.append((translation(30021), 'RunPlugin(plugin://plugin.program.chrome.launcher/?url='+urllib.quote_plus(site)+'&mode=showSite)',))
liz.addContextMenuItems(entries)

xbmcplugin.addDirectoryItem(pluginhandle, DirectoryItem_url, listitem=liz, isFolder=isFolder, totalItems=post_total)

Your addon would then parse that parameter and determine what to do.
Reply
#3
Thanks, but this is not what I am asking. Karaoke window is a Standart (built-in) Lodi window
Reply
#4
please be aware that there's no karaoke window in kodi anymore. it was removed last year.

since it's a built-in window, there's not much you can do with it in python.
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

Logout Mark Read Team Forum Stats Members Help
How to open window and send parameters?0