Plugin python directory services for XBMC (now in SVN)

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
SleepyP Offline
Posting Freak
Posts: 2,277
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #61
Hey folks. I have been very busy with my day job lately, so I kindof missed the boat on the new plugins feature. Is there documentation on it that I'm not finding?

Catchy Signature Here
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #62
probably not. see the pinned topic in development
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #63
And feel free to add documentation to the wiki - on both the user side (where to get them (google SVN) and what to do to "install" them) and the dev side (the API).

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
asg Offline
Member
Posts: 80
Joined: Nov 2005
Reputation: 0
Post: #64
Is it possible to specify the action to be done with the given "url"?

For now a Program Plugins tries to run a xbe but i would be nice to do other actions than just runxbe or whatever the default actions are for the other plugins.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #65
if the url points back to the plugin, you should be able to do anything you want.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
asg Offline
Member
Posts: 80
Joined: Nov 2005
Reputation: 0
Post: #66
Nuka1195 Wrote:if the url points back to the plugin, you should be able to do anything you want.
Could you give me hint how to perform a custom action on a "plugin://" url please?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #67
URL:

plugin://<whatever the path you want goes here>

Make it a file item (i.e. don't set the bIsFolder flag).

Your script will be run again using the URL you provided. You can then do what you want with that (eg run a built in on it to do something etc.)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Basje Online
Skilled Python Coder
Posts: 1,092
Joined: Jul 2005
Reputation: 6
Post: #68
I am trying to set the Label2 of an listitem, but they won't show. I did notice that the properties I set using setInfo("video" {'propertie': 'value'}) are only shown on video items (so items with isFolder=False) as label2.

Is there anyway to get them displayed in folder items? Because I see no other way to set the Label2 of a folderitem any other way?

find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #69
you set label2, by setting the appropriate infolabels and sortmethods.

eg size and SORT_METHOD_SIZE

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Basje Online
Skilled Python Coder
Posts: 1,092
Joined: Jul 2005
Reputation: 6
Post: #70
Nuka1195 Wrote:you set label2, by setting the appropriate infolabels and sortmethods.

eg size and SORT_METHOD_SIZE

That works for video items, but not for items which are folders! And that is what I would like to do: set the label2 of those items that are added using the isFolder=True part in the addDirectoryItem methode. And that does not work at this moment.

find quote
Basje Online
Skilled Python Coder
Posts: 1,092
Joined: Jul 2005
Reputation: 6
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
Member
Posts: 51
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 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
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,333
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 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
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
Post Reply