blastbeng / spotisub

Spotify to subsonic Playlist Generator and Importer
MIT License
107 stars 6 forks source link

how to properly map navidrome & lidarr #32

Closed gardiol closed 2 months ago

gardiol commented 2 months ago

Hi! my navidrome is on https://navidrome.mydomain.com and my lidarr is on https://somewhere.mydomain.com/lidarr

they are both behind NGINX reverse proxy, and the work just fine. Navidrome is used with some subsonic android app, so the rest API endpoint works just fine.

I tried to put those URLs in spotisub, with XXX_PORTS=443, but i cannot make it work, it keep saying "Unable to communicate with Subsonic".

Is there anything i should be doing and i am not?

blastbeng commented 2 months ago

Look at the Wiki, section Environment Variable

If you have lidarr and navidrome on a subpath you need to tell that to Spotisub, take a look at:

SUBSONIC_API_BASE_URL LIDARR_BASE_API_PATH

gardiol commented 2 months ago

My navidrome run in a separate container with a separate non-root user (actually i use podman, everything rootless). The service itself run on 127.0.0.1:4533, as a public service it's reachable at https://navidrome.mydomain.com, and the API endpoint works fine with android apps.

My Lidarr runs on bare metal, on it's own user. The service itself run on 127.0.0.1:8686, as a public service it's reachable at https://xxx.mydomain.com/lidarr

Both public APIs are redirected by NGINX.

I tried the following:

and i also tried the following:

didn't got to the lidarr part, but always getting the "Unable to communicate with Subsonic" error and, in the container logs:

WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x5605f24a9670 pid: 3 (default app)
2024-09-18 09:17:46 ERROR    <class 'spotisub.exceptions.exceptions.SubsonicOfflineException'> main.py 92
Traceback (most recent call last):
  File "/home/user/spotisub/./main.py", line 92, in get
    subsonic_helper.checkPysonicConnection()
  File "/home/user/spotisub/./spotisub/helpers/subsonic_helper.py", line 43, in checkPysonicConnection
    raise SubsonicOfflineException()
spotisub.exceptions.exceptions.SubsonicOfflineException
[pid: 3|app: 0|req: 1/1] 10.89.0.11 () {74 vars in 1755 bytes} [Wed Sep 18 09:17:46 2024] GET /generate/artist_recommendations/all/ => generated 66 bytes in 6 msecs (HTTP/1.1 400) 3 headers in 121 bytes (1 switches on core 0)

The 127.0.0.1 i guess would never work because the container would resolve that as itself and not the host server... somehow i need to use the full public hostnames...

gardiol commented 2 months ago

Update: maybe i did some typing error the first time, or messed up something, now it seems navidrome is being found with the following setup, for future reference:

      - SUBSONIC_API_HOST=https://navidrome.mydomain.com
      - SUBSONIC_API_BASE_URL=/
      - SUBSONIC_API_PORT=443
      - SUBSONIC_API_USER=xxx
      - SUBSONIC_API_PASS=xxx
blastbeng commented 2 months ago

Update: maybe i did some typing error the first time, or messed up something, now it seems navidrome is being found with the following setup, for future reference:

      - SUBSONIC_API_HOST=https://navidrome.mydomain.com
      - SUBSONIC_API_BASE_URL=/
      - SUBSONIC_API_PORT=443
      - SUBSONIC_API_USER=xxx
      - SUBSONIC_API_PASS=xxx

Why are you configuring the variable SUBSONIC_API_BASE_URL? You don't have navidrome on a subpath.

The correct setup for you should be:

      - SUBSONIC_API_HOST=https://navidrome.mydomain.com
      - SUBSONIC_API_PORT=443
      - SUBSONIC_API_USER=xxx
      - SUBSONIC_API_PASS=xxx