rattboi / mopidy-subsonic

Mopidy backend extension for playing music from Subsonic Music Streamer
MIT License
17 stars 14 forks source link

Does not start without Context Setting. #15

Closed Rabbit234 closed 8 months ago

Rabbit234 commented 8 years ago

Is there any way to get this extension working without using the context setting? I use subsonic with Apache reverse Proxy and my domain looks like this: https://music.example.com/

If you start it without context setting it says:

WARNING Found subsonic configuration errors, the extension has been automatically disabled: WARNING subsonic/context must be set. WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.

mo1783 commented 8 years ago

I managed to change the context of my subsonic server to https://my-domain/subsonic. Now I'm getting the following error during start-up of mopidy:

2015-11-20 08:51:42,592 ERROR [3122:MainThread] mopidy.commands: Got un-handled exception from SubsonicBackend Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 239, in _actor_error_handling yield File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 380, in start_backends config=config, audio=audio).proxy() File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 94, in start obj = cls(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/actor.py", line 27, in init config['subsonic']['context']) File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/client.py", line 121, in init self.api = libsonic.Connection(self.api_hostname, self.api_user, self.api_pass, port=int(self.api_port), serverPath=self.api_context) File "/usr/local/lib/python2.7/dist-packages/libsonic/connection.py", line 156, in init self._opener = self._getOpener(self._username , self._rawPass) File "/usr/local/lib/python2.7/dist-packages/libsonic/connection.py", line 2345, in _getOpener HTTPSHandlerChain(context=context)) TypeError: init() got an unexpected keyword argument 'context'

unhammer commented 8 years ago

When I put "/" as the context, it seems to start fine (is listed in enabled extensions), but I still don't see anything about subsonic in gmpc nor ncmpcpp

EDIT: had to use the git version of mopidy-subsonic with this patch: https://github.com/rattboi/mopidy-subsonic/issues/13#issuecomment-181364714 and my config is now

[subsonic]
hostname = mysubdomain.subsonic.org
port = 80
ssl = no
context = /
# etc.

Note that I have ssl=no and port=80 even though the site itself is port 8443 with ssl (it won't find the redirect from subsonic.org if you specify port 8443 at first).

added that to https://github.com/rattboi/mopidy-subsonic/pull/19