[Linux] How do I create a plugin
#1
I want to create a plugin to view videos from a webpage. I have followed this tutorial which state I should place the plugin in a folder in PLUGINS/VIDEO in xbmc folder but I can't find this folder. I toyed a little bit and it didn't help.

Also, I tried to install this addon which ask for the same path. I tried to place it in the addon folder (and rename it) but it didn't work, I didn't see the plugin in xbmc. I tried to use youtube xml file (after it has been edit) and I could see the plugin but it crashes.

What are the main steps to create a plugin for Linux? Basically, I have a python program which can generate urls, names and icons, how do I create a xbmc gui out of it?
Reply
#2
yotama9 Wrote:I want to create a plugin to view videos from a webpage. I have followed this tutorial which state I should place the plugin in a folder in PLUGINS/VIDEO in xbmc folder but I can't find this folder. I toyed a little bit and it didn't help.

Also, I tried to install this addon which ask for the same path. I tried to place it in the addon folder (and rename it) but it didn't work, I didn't see the plugin in xbmc. I tried to use youtube xml file (after it has been edit) and I could see the plugin but it crashes.

What are the main steps to create a plugin for Linux? Basically, I have a python program which can generate urls, names and icons, how do I create a xbmc gui out of it?

that tutorial is fairly old now. i found the best thing to do was read other peoples code. but i created a tutorial for a very simple plugin here which might help (and it also links to another nice tutorial).

a more complex example will appear as part of the urlresolver docs here at some point but i haven't finished writing it yet Wink

t0mm0
Reply
#3
Great, thanks. I have created a nice list of sub-sites I want to show. Each Item in the list should create a new list of available episodes. How do I clear the list? How do I tell the code to execute a new part when an item from the list is selected? (Listener?)
Reply
#4
yotama9 Wrote:Great, thanks. I have created a nice list of sub-sites I want to show. Each Item in the list should create a new list of available episodes. How do I clear the list? How do I tell the code to execute a new part when an item from the list is selected? (Listener?)

have you read the documents i linked to? your best bet after that is to read code from other addons (if you want to look at mine go here).

your plugin doesn't run continuously (so doesn't need to listen for anything) - it is passed arguments every time it is called (when you select a directory item in xbmc that is part of your addon). sys.argv[2] contains the query string you added for the directory item that has been selected.

in future you are probably better off asking dev questions in the dev forum.

t0mm0.
Reply
#5
OK. I'll post my further question in that sub-forum. I'm still not sure how do I tell the program that an item has been selected.
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] How do I create a plugin0