Skip to content

Spotify Connect: make the advertised host ip an explicit setting #372

Description

@magedhennawy

from the #354 thread on api/spotify.py:182.

right now the advertised address is worked out by inspecting local interfaces, which doesn't survive docker. the container's own ip is what gets picked up, and a spotify client on the lan can't reach that. auto detection tricks don't help either, opening a socket toward an external address just returns whichever interface the container would route out of, so it has the same problem.

proposal from the thread: make it an explicit setting.

  • config entry for the host ip, with the existing env var as a fallback
  • a field in the frontend settings so it's discoverable
  • when not containerised, default it to the detected value so a bare metal install still works with no setup
  • leave it blank in docker rather than guessing, so it's obvious it needs setting instead of silently advertising something unreachable
  • log or surface a warning when nothing usable is configured

worth knowing there are two separate reports of the device never showing up, #316 and #304, both macos. those may be a different cause, librespot advertises via gethostbyname(gethostname()) which on macos often resolves to 127.0.0.1, but an explicit host ip setting would give those users a way out regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions