Plugin python directory services for XBMC (now in SVN)

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Basje Offline
Skilled Python Coder
Posts: 981
Joined: Jul 2005
Reputation: 4
Post: #71
No update on showing the infolabels on folder items? Or at least overriding them by setting the label2 of a folder item?

find quote
jonib Offline
Junior Member
Posts: 45
Joined: Mar 2006
Reputation: 0
Question  Deleting from a plugin? Post: #72
Hi

I am about to make a plugin to access Azureus, the most important feature I want is to be able to delete a torrent from Azureus, so is there support for deleting from a plugin?

As I'm trying a bunch of plugins the My Videos screen is getting crowded, is there support for a Directory/folder to put plugins in?

jonib
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #73
in the support forum

http://forum.xbmc.org/showthread.php?tid=30351

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #74
[I don't know if this is the right place to bring this up, but I didn't feel like starting a new thread would be prudent.]


Can someone explain to me why scripts and plugins go into different folders?

Wouldn't it be better to have one folder called 'addons' or something similar xbmc.setAddonType(...) with arguments like script, videoPlugin, musicPlugin, picturePlugin, and programPlugin and then to use them, add them as we already do, plugin://... and the system could figure out what to do from there.

ALTERNATIVELY
when a .py file is launched, it checks to see if xbmcplugin is imported, and if it isn't, it's a script. easy(?).

This would do 3 things:
  • solve the "plugins don't run from my script folder zomg!? whats wrong pls help" problem
  • allow us to add scripts as sources under programs/videos/music/pictures/etc for better integration with the xbmc philosophy
  • give us a 'master' addons folder much like the script folder we have now, except with plugins as well.

The biggest problem i see with this is backwards compatibility. And... that is a big one. Maybe a script or plugin could go through and edit all the .py files to make them correct (only default.py would need to change, I would think).

What do you guys think? Is it too late for something like this? Unnecessary? I just think that merging plugins and scripts could lead to less end-user confusion, which in turns pushes xbmc just a little more mainstream.
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #75
plugins fill media lists for the most part. there are few exceptions. so installing those in the scripts window makes no sense.

if i want to view streaming videos. i would like to go to videos section to do it. streaming music, music section...

you can however create a script that calls xbmc.executebuiltin("Activate.Window(videos,plugin://...)") if you prefer to have everything in one window. I don't.

also, adding a source similar to "plugin://programs/" to each media window, will list all plugins for that window. no need to add source for each one. Library already handles this, but it's nice for picture and programs windows.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
AnalogKid Offline
Fan
Posts: 644
Joined: Feb 2009
Reputation: 141
Post: #76
Hi all, please forgive my obviously noobie question... but I have to start somewhere...

A plugin effectively represents a hierarchical menu / filesystem structure right?... and as such can act as a legitimate 'source' of media for XBMC.

If a plugin was written that 100% mirrored a filesystem... would it be visually rendered EXACTLY the same way as if the data had come from a 'native' source?
What I mean by this is... if I wrote a plugin that literally represented the filesystem and returned strings of the filenames (folder.jpg, movie.avi etc), all skins would render exactly the same as native file system?.. showing the fanart, and movies etc

Actually.. it's more than one question I need to ask...

The strings that the plugin returns represent nodes / files / folders... but at some point, XBMC needs to physically transport the data that those string represent right (needs to pull the files)?... is the plugin responsible for that, or must the string be a URI / URL that XBMC itself can pull the data from?

And finally... once XBMC has rendered list items / nodes that the plugin has supplied... how can the plugin detect that XBMC UI has selected one of the items in order to play it? ( I assume for a folder, XBMC will call the plugin once again with the folder path, but for a non folder... what happens then?)


I reiterate... a total noobie, and I have scanned extensively for help... but there's a lot of it, and much of it not great for the uninitiated!
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,054
Joined: Sep 2004
Reputation: 146
Post: #77
@AnalogKid
I believe the feature evolved since the thread started, although the main idea is the same - for plugins you basically parse some data source of your choice, usually HTML, and then add items to the directory and depending on the media type, XBMC will know how to "play" it. It's much much easier to write plugins than scripts - I should know, I started both with little information and looked at other people's scripts/plugins, and wrote about 5 plugins in a month or so.

I would recommend looking at Nuka1195 plugins and from other people, and lastly, why not the ones in my signature. If you have specific questions you should probably start a new thread in the same forum and people will try to help you.
find quote
chunk_1970 Offline
Skilled Python Coder
Posts: 244
Joined: Jan 2005
Reputation: 0
Post: #78
Hi,

Im currently updating one of my plugins but seem to be having problems:

Im looking to display the label2, which I presume is the right hand label but it doesn't seem to work. The reason I want to use this rather than the infoLabels is becuase I dont want the list sorted in any way as my 2nd labels do not fit into any of the standard categories. Using the infolabels with valid dictionary items like 'Genre' etc displays correct but it also sorts. When I use UNSORTED or NONE I dont see any labels and having text in 'label2' of ListItem doesn't display anything.

Any Ideas would be much appreciated..

New: Azureus/Vuze Program Plugin [ Additional Torrent website Plugins here ]

Bedroom: Xbox1: Executer 2 - 120GB:nod:
Main: Asrock ION 330HT, HT Remote configured as XBOX Remote, Also Tvheadend, VncServer, Transmission, Sabnzbd, Acting as Router with (Hostapd/USB modem) and finally a Samba server for Drobo (5TB) running XBMC 9.11 on Ubuntu 2.6.17
:shocked:
find quote
alertrarimi Offline
Junior Member
Posts: 7
Joined: Jun 2011
Reputation: 0
Location: ÐÔ
Post: #79
Ive seen it out there in servers but I cant find it anywhere.

Im lookin for a plugin that allows people to give others their throwables much like how you can give other survivors pills and whatnot.
find quote
Post Reply