Fix: Subsonic: Handle uninitialized port config value (#2263)
authorEric Munson <eric@munsonfam.org>
Tue, 1 Jul 2025 21:43:21 +0000 (17:43 -0400)
committerGitHub <noreply@github.com>
Tue, 1 Jul 2025 21:43:21 +0000 (23:43 +0200)
commit160c293198afc975982ac87e4938c9e97a4e2c17
tree1b175a0adf93e2cf75aa87d30d7172c3841bea38
parent3c16bfc5ca897620bf269add74e884dd5c859cdd
Fix: Subsonic: Handle uninitialized port config value (#2263)

Fix uninitialized port config value

The or construction does not seem to protect against None value when
there are tranformations applied in the lhs (or evaluates after the
str() and int() conversions. This leads to problems when no value is set
for port. Change back to the more verbose if port else 443 construction
to fix this.

Fixes: https://github.com/music-assistant/support/issues/4086
Signed-off-by: Eric B Munson <eric@munsonfam.org>
music_assistant/providers/opensubsonic/sonic_provider.py