diff --git a/busch_radio_spotify/Dockerfile b/busch_radio_spotify/Dockerfile index 8237515..dc4bb62 100644 --- a/busch_radio_spotify/Dockerfile +++ b/busch_radio_spotify/Dockerfile @@ -28,12 +28,21 @@ RUN git clone --depth 1 --branch v0.7.0 \ # Wir patchen den TcpListener::bind-Aufruf direkt, sodass er immer an 0.0.0.0 # bindet (mit dem gleichen Port wie im redirect_uri angegeben). # Außerdem ersetzen wir die englische Browser-Meldung durch eine deutsche. + # Patch 1: "Browse to:"-URL auf stderr statt stdout. + # librespot schreibt die URL mit println! auf stdout, das in die ffmpeg-Pipe geht. + # eprintln! leitet auf stderr um → erscheint im HA-Log, nicht in ffmpeg. + sed -i \ + -e 's/println!("Browse to: {auth_url}")/eprintln!("Browse to: {auth_url}")/' \ + -e 's/println!("Provide redirect URL")/eprintln!("Provide redirect URL")/' \ + oauth/src/lib.rs && \ + grep -n "eprintln.*Browse to" oauth/src/lib.rs || { echo "FEHLER: println→eprintln Patch fehlgeschlagen!"; exit 1; } && \ + # Patch 2: OAuth-Callback-Server auf 0.0.0.0 binden (statt nur 127.0.0.1). + # Damit ist der Callback aus dem Heimnetz erreichbar. sed -i \ -e 's/TcpListener::bind(socket_address)/TcpListener::bind(std::net::SocketAddrV4::new(std::net::Ipv4Addr::UNSPECIFIED, socket_address.port()))/' \ -e 's/Go back to your terminal :)/Autorisierung erfolgreich! Du kannst diesen Tab schliessen./' \ oauth/src/lib.rs && \ - echo "--- oauth/src/lib.rs (Patch-Zeilen) ---" && \ - grep -n "UNSPECIFIED\|Autorisierung\|SocketAddrV4" oauth/src/lib.rs || true && \ + grep -n "UNSPECIFIED" oauth/src/lib.rs || { echo "FEHLER: TcpListener-Patch fehlgeschlagen!"; exit 1; } && \ cargo build \ --release \ --locked \ diff --git a/busch_radio_spotify/config.yaml b/busch_radio_spotify/config.yaml index 37a02b9..cacf52a 100644 --- a/busch_radio_spotify/config.yaml +++ b/busch_radio_spotify/config.yaml @@ -1,6 +1,6 @@ --- name: "Busch-Radio Spotify Bridge" -version: "1.0.7" +version: "1.0.8" slug: busch_radio_spotify description: > Streamt Spotify-Musik als Internet-Radio-Stream für das Busch-Jäger Unterputz-Internetradio. diff --git a/busch_radio_spotify/run.sh b/busch_radio_spotify/run.sh index edb85cc..2b54a4b 100644 --- a/busch_radio_spotify/run.sh +++ b/busch_radio_spotify/run.sh @@ -171,8 +171,9 @@ else bashio::log.info "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" bashio::log.info "ERSTER START – Spotify-Autorisierung erforderlich!" bashio::log.info "" - bashio::log.info "1) librespot gibt gleich eine 'Browse to:'-URL aus." - bashio::log.info " Kopiere diese URL und öffne sie im Browser." + bashio::log.info "1) Gleich erscheint im Log eine Zeile:" + bashio::log.info " Browse to: https://accounts.spotify.com/authorize?..." + bashio::log.info " Kopiere diese URL vollständig und öffne sie im Browser." bashio::log.info "" bashio::log.info "2) Melde dich mit deinem Spotify-Konto an" bashio::log.info " und erteile die Berechtigung."