Any how-to add a new media source plugin available?
#1
Hey All

I'm looking to add a new type of media source to the XBMC music player. I don't have a windows box so I can't get the xbox development environment, so I have to do it in Python if I do it at all. Can anyone point me in the direction of some howto's? I can't seem to find anything related to writing new sources in Python. I can do all the leg work in getting the list of artists/albums/songs/etc, I just need to know how I can register a new type of music source, and export the artists/albums/songs to the media player so it can add them to its library.

Can this be done at all? Am I way off here? If not, it seems this would be a really handy use for the python plugin framework. That way people could write custom scripts to do whatever they wanted depending on their home setup.
Reply
#2
Ok, after a bit of googling I've seen videos of people adding plugin media sources to the video and music players so it seems it can indeed be done. I'm going to hunt around for some music source plugins and see what they do and see if I can't rip it up to make it do what I want. Hopefully, if all goes well, getting it working with the xbmc library will be as easy as hitting the 'add to library' button, but we'll see.

Any pointers to how to write a music source plugin would still be amazing. Thanks!
Reply
#3
Yes, it's possible.

Basically you just write a python script to generate the listings (artist/album/song if you want that type of structure).

The script basically fills in the information about each item (tagging information etc.) and the path to the file.

The tricky bit is where these files are being obtained from - the players can only (currently) understand the filesystems that we already have (http, local, smb, xbms, daap, ftp etc. etc.).

If you require a special protocol at the file access level, then it can't be done with the python plugin system - that handles the directory listing side of things only.

If you have a linux environment, then you can always implement directly via the linuxport, and I'm sure someone will backport to win32/xbox for you.

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
Reply
#4
Ah, I see via xbox-scene that you are linux based.

Grab the sources from branches/linuxport and have a play. The primary environment we use is ubuntu (feisty or gutsy should work fine) but I'm sure an enterprising individual such as yourself will be able to get it running under your distro of choice.

If the files themselves are shared via smb, and all you are wanting to do is a new "library front end" to the files (i.e. instead of relying on tag information within the files) then the plugin system will do the trick.

If the files are shared by some other system that our filesystem doesn't support (nfs, or some custom streaming system) then you'll need to hack up a CFile class to handle the reading.

You can join #xbmc-linux or #xbmc on freenode to chat if you need more info.

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
Reply
#5
Wink 
http://xboxmediacenter.com/wiki/index.ph...rt_project
http://xboxmediacenter.com/wiki/index.ph...ource_code
http://xboxmediacenter.com/wiki/index.ph...it_a_patch

also see: http://forum.xbmc.org/showthread.php?tid=28031

More information here: http://xboxmediacenter.com/wiki/index.ph...ment_Notes

Big Grin
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Any how-to add a new media source plugin available?0