[RELEASE] Ampache Client Plugin - Browse & search the catalog on your Ampache Server
#1
Thumbs Up 
Ampache is a web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device. If you guys haven't seen it, you should check it out. Clients are available for nearly all mobile platforms to stream your music on the road, plus there is HTTPQ and MPD support so you can use the Ampache web interface to push music to an MPD server or a copy of Winamp somewhere on the network.

The plugin will let you browse and search the catalog on an Ampache server in various ways (using Ampache's XML-API) and then stream whatever you want from it. The structure is loosely based on bjgeiser's Ampache Mobile, which is what I use to stream Ampache from my phone.

I've currently got the plugin running on my production box (Apple TV running Ubuntu+XBMC R28256) and on my dev machine (Win7 with some version of Dharma, I believe) so I think it's relatively compatible with most versions of XBMC.

I'm new to both XBMC and Python - please don't judge my code too harshly Smile.

http://code.google.com/p/xbmc-ampache-plugin/

Set your server url, username, password in plugin settings. Server url needs to be in the exact format that the default is in: http://serverurl.com/ampache/ Note the "http://" at the beginning and the trailing slash.

Known issues:

No support for paging in any view: you get up to 5000 results all at once and that's it. (TODO - will be in next version)

Bug reports, feature requests, etc. are greatly appreciated.

---

Updates:
11/15/2010, updated to v0.1.1 - added random albums and a context menu item (for albums) to show all other albums from an artist.
11/16/2010, updated to v0.1.2 - removed hashlib binaries, should now be completely platform agnostic.
Reply
#2
what is ampache?
Reply
#3
Quote:Ampache is a web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
http://ampache.org/
Reply
#4
ok, so your plugin allow the get stream from an ampache server ?
Reply
#5
The plugin will let you browse and search the catalog on an Ampache server in various ways (using Ampache's XML-API) and then stream whatever you want from it.

The structure is loosely based on bjgeiser's Ampache Mobile, which is what I use to stream Ampache from my phone.
Reply
#6
ok, thanks Wink
Reply
#7
updated to v0.1.1 - added random albums and a context menu item (for albums) to show all other albums from an artist.
Reply
#8
Thank you so much, I've been waiting for this kind of addon to be able to have only one music database (which would be on my ampache server). I'm definitely gonna try this one !

Just a quick question (before I try it, so maybe I would know the answer by trying it): is it possible to rate a track on xbmc and have the rating stored in ampache ? is it possible at all to rate a track on ampache with XML-API ?
Reply
#9
It doesn't look like it's possible in the XML-API at the moment.

I'll look into how complicated a patch would be; maybe we can get vollmerk to add it for 3.6.

Edit: Looks like Karl is already looking at it.
Reply
#10
great ! when XML-API of ampache will provides this, my dream will be fullfilled Smile

now back to your addon.

I tried it but I was unsuccessfull, here's the relevant part of the log:

Quote:17:56:34 T:140384160184080 M:1798307840 ERROR: Unable to load /home/xbmc/.xbmc/addons/plugin.music.ampache/resources/platform_libraries/Linux/_hashlib.so, reason: /home
/xbmc/.xbmc/addons/plugin.music.ampache/resources/platform_libraries/Linux/_hashlib.so: mauvaise classe ELF: ELFCLASS32
17:56:34 T:140384160184080 M:1798307840 ERROR: xbp_dlopen failed to load /home/xbmc/.xbmc/addons/plugin.music.ampache/resources/platform_libraries/Linux/_hashlib.so

as you can see the problem comes from my system which is 64bits whereas the library hashlib is compiled as 32bits.

Do you know where I can find a 64bits version ?

Thanks
Reply
#11
PunkyMatt Wrote:great ! when XML-API of ampache will provides this, my dream will be fullfilled Smile

now back to your addon.

I tried it but I was unsuccessfull, here's the relevant part of the log:



as you can see the problem comes from my system which is 64bits whereas the library hashlib is compiled as 32bits.

Do you know where I can find a 64bits version ?

Thanks

I'm not a fan of including all of this binary crap in the package but I originally wrote guts of the plugin (all of the basic API authentication stuff) to Python 2.6, before I realized that XBMC was stuck on 2.4.

I found a pure python implementation of the hash function that I need; I uploaded 0.1.2b to the Google Code page. It's completely untested but give it a shot if you feel like it.
Reply
#12
It's working nicely. Great addon you made ! Thank you.

Too bad we can't add an ampache server as a music source, so it would be possible to scan the ampache shared library in xbmc in order to display fanarts...
Reply
#13
That would be nice. Where does XBMC go to get fan art for music? I've hacked last.fm integration on to my Ampache server but last.fm artist pics are too small for fan art.

Edit: found htbackdrops.com. Looks like you'd need support for it on the Ampache server. When I get some time, I think I might be able to hack it onto mine.
Reply
#14
yes xbmc scrapes music fanart on htbackdrops.com.

But if it find fanart locally it will use it. for example here's one of my music folder:

My music collection is organized like this:

Code:
Music/
---A/
------Artist Name/
---------Album1Year - Album1/
---------Album2Year - Album2/
---B/
...

Here's an example of what's inside an artist's folder:

Code:
drwxrwxr-x 1973 - New York Dolls/ <--- the album
drwxrwxr-x extrafanart/ <--- used by night (and maybe some other skins) to display multiple fanarts
-rw-rw-r--  fanart.jpg <--- fanart used by xbmc
Reply
#15
We'd need to get Ampache to read the fanart on catalog updates and then pass a url in the API response. I'm not really up on Ampache's plugin interface but this seems like the kind of thing a plugin would be good for.

I added a license notice for the code I added this afternoon and called that beta you got v0.1.2.
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Ampache Client Plugin - Browse & search the catalog on your Ampache Server0