Announcement

Collapse
No announcement yet.

Announce: Ampache plugin 1.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Announce: Ampache plugin 1.0

    After what feels like an eternity of development, I'm happy to announce my first SqueezeCenter plugin. It provides SqueezeCenter with access to music stored on an Ampache server. You can find more info about Ampache at their site:



    You can download the plugin from:



    Since the plugin utilizes Ampache's XML based API the server can be located anywhere, effectively allowing SqueezeCenter to have a remote catalog. Essentially this provides similar functionality to the MP3Tunes plugin, minus the cost, but plus the need to setup and run an Ampache instance somewhere. Since you can connect multiple Ampache instances together, you and your friends can share your catalogs with each other and have access to everyone's music through SqueezeCenter.

    Since Ampache development is out of my control there are a few documented issues, but the majority of the functionality works as intended and should be fully functional after the next Ampache release.

    Please report any bugs or feature requests you might have. Patches and suggestions are always welcome. I'm sure some of the more savvy plugin developers out there might have a tip or two as to how I could have done things better. Enjoy.

    Robert

    #2
    This is great news, I've been waiting for this to come along for as long as I've known of Ampache. Thank you :-)

    Comment


      #3
      I'm getting 404 Not Found error

      Robert,
      Tried installing the plugin with extension downloader and manually. Every time when I go to settings>plugins>ampache>settings I get "404 Not Found: settings/plugins/Ampache/settings/basic.html". Any suggestions? Thanks in advance.
      Silverbullet

      Version: 7.3.3 - 27044 @ Mon Jun 15 15:14:08 PDT 2009
      Hostname: Ted3
      IP: 192.168.1.22
      HTTP Port: 9000
      OS: Windows XP - EN - cp1252
      Platform: 586
      Perl Version: 5.8.8 - MSWin32-x86-multi-thread
      MySQL Version: 5.0.22-community-nt
      Total Players Recognized: 5

      Comment


        #4
        Originally posted by Silverbullet View Post
        Robert,
        Tried installing the plugin with extension downloader and manually. Every time when I go to settings>plugins>ampache>settings I get "404 Not Found: settings/plugins/Ampache/settings/basic.html". Any suggestions? Thanks in advance.
        Yup, the problem was I assumed that everyone's PERL install would include a particular module and it doesn't. I released version 1.1 earlier this week which includes Digest::SHA::PurePerl which should fix this problem.

        Comment


          #5
          Originally posted by flemming View Post
          Yup, the problem was I assumed that everyone's PERL install would include a particular module and it doesn't. I released version 1.1 earlier this week which includes Digest::SHA::PurePerl which should fix this problem.
          In my case this did not fix my problem. I have 1.1 installed and I still get the 404 error. Any additional things I can check?

          Comment


            #6
            Turn on debugging for 'plugin.ampache' under 'Settings/Advanced/Logging' and then check out the squeezecenter log file (not sure where that lives under Windows) for some hopefully more useful info. Let me know what you find. I've never tested the plugin under Windows, so there may be a couple other things I took for granted because I'm using Linux.

            Comment


              #7
              Originally posted by flemming View Post
              Turn on debugging for 'plugin.ampache' under 'Settings/Advanced/Logging' and then check out the squeezecenter log file (not sure where that lives under Windows) for some hopefully more useful info. Let me know what you find. I've never tested the plugin under Windows, so there may be a couple other things I took for granted because I'm using Linux.
              Funny thing there is no plugin.ampache in the list. But here is something from the log:
              [09-06-27 14:05:32.5469] Slim::bootstrap::tryModuleLoad (278) Warning: Module [Plugins::Ampache::Plugin] failed to load:
              Can't locate object method "BINMODE" via package "Slim::Utils::Log::Trapper" at /<C:\Program Files\SqueezeCenter\server\squeezecenter.exe>CGI.p m line 797.
              BEGIN failed--compilation aborted at Ampache/Ampache.pm line 33.
              Compilation failed in require at Plugins/Ampache/Plugin.pm line 24.
              BEGIN failed--compilation aborted at Plugins/Ampache/Plugin.pm line 24.
              Compilation failed in require at (eval 1152) line 2.
              BEGIN failed--compilation aborted at (eval 1152) line 2.

              [09-06-27 14:05:32.5477] Slim::Utils::PluginManager::enablePlugins (493) Error: Couldn't load Plugins::Ampache::Plugin

              Comment


                #8
                Hmmm, I'll need to dig up a Windows machine and do some poking around. I'll get back to you.

                Comment


                  #9
                  Robert

                  I've gotten the plugin (1.1) installed and configured and I've got Ampache v.3.5-Beta2 Subversion Rev: 2001 running.

                  Looking at the plugin settings it asks for:
                  Ampache version #
                  Ampache server URL
                  Ampache username
                  Ampache password

                  I've supplied all these, saved the changes and restarted SC. Where to from here?
                  Last edited by Guest; 2009-06-28, 20:48.

                  Comment


                    #10
                    First off I'd highly suggest upgrading Ampache to 3.5.1 as it fixes a number of bugs in the API that the plugin relies on, but the SVN version you have may have those fixes already too. If you've got things configured and you've restarted Squeezecenter you should see Ampache under Music Services. If you don't then I'm going to jump out a window
                    Last edited by flemming; 2009-06-28, 22:41.

                    Comment


                      #11
                      Thx, I'll install the latest version and then try it again - I think the issue was that I didn't have a player connected and from memory Music Services requires a connected player.

                      Comment


                        #12
                        Originally posted by flemming View Post
                        Hmmm, I'll need to dig up a Windows machine and do some poking around. I'll get back to you.
                        Alright I think I got it. Again the problem was a missing PERL module. I switched from using CGI::escape() to URI::Escape::uri_escape() since the former doesn't seem to be included with SqueezeCenter. With that I was able to get the plugin to load on a freshly installed Windows machine. I'll release a new version shortly with this simple fix. Hopefully this takes care of the problem.

                        Comment


                          #13
                          Originally posted by flemming View Post
                          First off I'd highly suggest upgrading Ampache to 3.5.1 as it fixes a number of bugs in the API that the plugin relies on, but the SVN version you have may have those fixes already too. If you've got things configured and you've restarted Squeezecenter you should see Ampache under Music Services. If you don't then I'm going to jump out a window
                          Ok, I've installed 3.5.1 and it's up and running, however, I don't see Ampache under music services.

                          To clarify my Setup:
                          SqueezeCenter 7.3.2 running on my NAS IPort - 192.168.168.100:9009
                          Ubuntu 9.04 running on PC IP - 192.168.168.2
                          Ampache 3.5.1 running on abovementioned PC, accessed via http://localhost/ampache/
                          Ampache referencing music store on NAS, mounted ro as /media/AudioLIB

                          Under SC Extras/ Music Source I only have the following entries:
                          SqueezeNetwork
                          N5200PRO

                          One other thing - if I've understood the intent of your plugin correctly the Ampache database becomes another music source, so control is still vested with SC? How much effort would it be to make the integration the other way around such that Ampache controls what it played and tells SC what to do via the SC CLI?


                          Please don a parachute should you head for the window :-)
                          Last edited by Guest; 2009-06-29, 07:16.

                          Comment


                            #14
                            I need some slightly better error handling in the plugin for when the server returns something like a 404. First off make sure that Ampache has the XML API enabled. I should document this on the site... On the server in config/ampache.cfg.php you'll need:

                            access_control = "true"
                            xml_rpc = "true"

                            You can enable debugging and check your web server's log for juicy tidbits should things still not work properly.

                            Now on the SqueezeCenter side enable debugging for plugin.ampache (see up a couple posts), Make sure you check the box to make that setting persistent after restarts. Restart squeezecenter and check your squeezecenter log /var/log/squeezecenter/server.log for anything useful. An invalid URL or misconfigured Ampache could be the problem.

                            Comment


                              #15
                              Choosing Music Source causes SC's left pane to hang around and do nothing with no response from the server. At the bottom left of the screen the following message is displayed:
                              Code:
                              Waiting for 192.168.168.100...
                              Eventually it times out or just returns a blank screen.

                              Herewith the log entries from slimserver.log
                              Code:
                              [09-06-29 20:16:52.3256] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:18:07.0064] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:19:22.0072] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:20:37.0078] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:21:52.0084] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:23:07.0091] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:24:22.0098] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              [09-06-29 20:25:37.1693] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "deviceid" on an undefined value at /raid0/data/module/SQUEEZECENTER/squeezecenter/Slim/Web/Pages/Home.pm line 243.
                              Last edited by Guest; 2009-06-29, 19:37.

                              Comment

                              Working...
                              X