create window that looks like video window - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: create window that looks like video window (/showthread.php?tid=199605) |
create window that looks like video window - vitorcarvalhoml - 2014-07-09 Hi, I writing a python script, and executing it throuhg skin with Runscript(path-to-python-file). Ok until here. The script must be able to create a window that looks like video window (capable of list item and if selected do something), but I not sure about wich class I must use. I tried xbmcgui.Window with addControl method, but I got only a black screen. I tried with xbmcgui.ListItem but without success. Wich class should I use? Thanks! RE: create window that looks like video window - ironic_monkey - 2014-07-09 do you actually need a custom window / a full blown script? sounds like you're trying to write a plugin.. EDIT: in case you're not aware. a 'script' is a full-blown window written in python. a 'plugin' is a virtual filesystem entry written in python. you provide a virtual filesystem, and it's listed as any other dirs in xbmc. RE: create window that looks like video window - vitorcarvalhoml - 2014-07-09 I guess I need because what I trying to do is show the file content (a list of items) The scenario is: I have a website that registers some quiz. The XBMC it's responsible to go to the server and get the quiz and store in a file. I already have an addon that do this. I think that the best way to show the quiz it's in the same way of videos or images. If the best practice it's to write a plugin then I'm going write a plugin. But I'm a little lost in what to do. What do you mean with full-blown? RE: create window that looks like video window - ironic_monkey - 2014-07-09 so you have a virtual filesystem with videos and pictures. by full-blown mean the need for custom controls, layouts etc. i still think you can do a plugin. if you want to do a script, see http://forum.xbmc.org/showthread.php?tid=174859 RE: create window that looks like video window - vitorcarvalhoml - 2014-07-09 Thanks! But how can I call my plugin when the user access some button in the UI? The same way? I read about it in http://wiki.xbmc.org/index.php?title=Python_development the difference it's only theoretical? RE: create window that looks like video window - ironic_monkey - 2014-07-09 other way around. the core calls your plugin. as i said it's a vfs, so you'll get a callback with whatever url you assigned to the item being clicked. encode all info in the url (typically, url parameters..). bam. RE: create window that looks like video window - vitorcarvalhoml - 2014-07-09 I guess I need to read more about python development xbmc addon. I guess it's not needed to use xbmcvfs, I already read the files content and I'm able to log this information. Thanks! RE: create window that looks like video window - vitorcarvalhoml - 2014-07-10 I found this addon (https://github.com/zstorok/xbmc-plugin-tutorial/blob/master/default.py) It's more or less what I need. What url parameters is this one? Looks like it must be 'plugin://..'... Here some code: Code: class quizWindow( object ): But I'm getting error: list index out of range (when I set self.handle) |