2013-09-11, 19:23
Hi there,
I've been googling this all along, but the XBMC add-on development docs are so bad, even after hours I wasn't a bit smarter about my problem. :-(
I want to write a video add-on which scrapes a few RSS feeds and plays videos from there. Normally I would simply go with xbmcgui.ListItem() and xbmcplugin.addDirectoryItem() to display a listing for all entries. This time, though, I'd like to create a completely new window so I have a little more control over the appearance.
I started with creating a simple class:
The problem that I have is that I only get a loading spinner when I start the add-on. The only thing I can do is to cancel this by hitting ESC twice. When I do that, it takes a while and then the add-on exits and the log shows the following:
I have searched this error message for hours and I found a lot of forum threads and bug reports, but never did I find a solution other than "developer has provided a new version". Not one of those threads had something to do with windows and video add-ons.
The only thing that seems to get rid of this is to change this part in my addon.xml
toBut the problem with that solution is that XBMC always shows a popup whether I want to "play" the item when I open the add-on (i.e. it shows my default play action that should only show up when I open a video file). When I remove the <provides> tag, that popup is gone, but it causes the add-on to be moved from the video add-ons section to "Programs".
Is there any way to solve this issue? Are custom windows for video add-ons even supported?
Thanks!
EDIT:
I also tried adding an empty directory using xbmcplugin.addDirectoryItem() but that doesn't work either. Shortly before the window opens an empty directory entry blinks up and the application breaks horribly when I exit the window.
I've been googling this all along, but the XBMC add-on development docs are so bad, even after hours I wasn't a bit smarter about my problem. :-(
I want to write a video add-on which scrapes a few RSS feeds and plays videos from there. Normally I would simply go with xbmcgui.ListItem() and xbmcplugin.addDirectoryItem() to display a listing for all entries. This time, though, I'd like to create a completely new window so I have a little more control over the appearance.
I started with creating a simple class:
PHP Code:
ACTION_PREVIOUS_MENU = 10
class Plugin_Video_Test(xbmcgui.Window):
def onAction(self, action):
if action == ACTION_PREVIOUS_MENU:
print "Hello world"
self.close()
test = Plugin_Video_Test()
test.doModal()
del test
Code:
19:10:50 T:140407241447360 ERROR: GetDirectory - Error getting plugin://plugin.video.test/
19:10:50 T:140407241447360 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.test/) failed
19:10:50 T:140406875166464 NOTICE: Thread Background Loader start, auto delete: false
19:10:56 T:140406883559168 ERROR: XBPyThread::stop - script /home/janek/.xbmc/addons/plugin.video.test/default.py didn't stop in 5 seconds - let's kill it
19:10:56 T:140405278496512 NOTICE: Hello world
19:10:56 T:140406875166464 NOTICE: Thread Background Loader start, auto delete: false
19:10:56 T:140406875166464 NOTICE: Thread XBPyThread start, auto delete: false
I have searched this error message for hours and I found a lot of forum threads and bug reports, but never did I find a solution other than "developer has provided a new version". Not one of those threads had something to do with windows and video add-ons.
The only thing that seems to get rid of this is to change this part in my addon.xml
Code:
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
Code:
<extension point="xbmc.python.script" library="default.py">
<provides>video</provides>
</extension>
Is there any way to solve this issue? Are custom windows for video add-ons even supported?
Thanks!
EDIT:
I also tried adding an empty directory using xbmcplugin.addDirectoryItem() but that doesn't work either. Shortly before the window opens an empty directory entry blinks up and the application breaks horribly when I exit the window.