All checks were successful
release / release (push) Successful in 10m37s
Spotify refuses librespot the audio keys ("error audio key 0 1",
librespot #1649), so nothing played. Playback now goes through Spotify
Soloist, Spotify's own headless Linux player:
- The TV downloads it from Spotify (redistribution is not allowed), keeps
it fresh (builds expire after 90 days), runs and restarts it, and drives
it over its local WebSocket API; its events feed Most szól.
- It needs the user's own Soloist API key: the key screen shows a QR code
to a small page on the TV where the phone pastes it (or type it on the
TV); asked once after sign-in, also in Settings. Then the TV is picked
once in the phone's Spotify app (pairing); home shows that step.
- Soloist is the Connect device; librespot only signs in (pairing code)
and browses. Its player, Connect and zeroconf are gone, and with them
GStreamer.
- A track from a list plays and the next ones are queued (Soloist's play
takes one URI). The queue panel is back (Soloist reports the queue).
- Settings: the player's state and key instead of quality/normalisation/
autoplay (Soloist decides those).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
2.2 KiB
Bash
Executable File
56 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds the store release assets into dist/:
|
|
#
|
|
# ./package.sh app.toml and support.bluefox.spotify-<version>.tar.zst
|
|
# (x86-64; dist/ is emptied first)
|
|
# ./package.sh --arm adds support.bluefox.spotify-<version>-aarch64.tar.zst
|
|
# (Raspberry Pi, cross-compiled)
|
|
#
|
|
# Build on Debian trixie or older (the TV's glibc), with the fontconfig,
|
|
# freetype and xkbcommon dev packages and sf-pack from the Fennec SDK:
|
|
# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.1 sf-pack
|
|
# --arm also needs gcc-aarch64-linux-gnu and the arm64 (multiarch) dev
|
|
# packages of fontconfig, freetype and xkbcommon.
|
|
# (No GStreamer: Spotify Soloist plays, downloaded on the TV.)
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
target="${CARGO_TARGET_DIR:-target}"
|
|
id=$(sed -n 's/^id *= *"\(.*\)".*/\1/p' app.toml | head -1)
|
|
version=$(sed -n 's/^version *= *"\(.*\)".*/\1/p' app.toml | head -1)
|
|
bin=spotify-tv
|
|
|
|
# pack <binary> <out dir>: the package with this binary.
|
|
pack() {
|
|
rm -rf pkg
|
|
mkdir -p pkg/bin
|
|
cp app.toml icon.png pkg/
|
|
install -m755 "$1" pkg/bin/$bin
|
|
sf-pack build pkg "$2"
|
|
sf-pack verify "$2"
|
|
rm -rf pkg
|
|
}
|
|
|
|
if [ "${1:-}" != --arm ]; then
|
|
cargo build --release --locked
|
|
rm -rf dist
|
|
pack "$target/release/$bin" dist
|
|
else
|
|
t=aarch64-unknown-linux-gnu
|
|
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
|
|
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
|
|
export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar
|
|
export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/
|
|
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
|
|
rustup target list --installed | grep -qx "$t" || rustup target add "$t"
|
|
cargo build --release --locked --target "$t"
|
|
rm -rf dist-arm
|
|
pack "$target/$t/release/$bin" dist-arm
|
|
# Fennec OS on ARM looks for <id>-<version>-aarch64.tar.zst (docs/store.md).
|
|
mkdir -p dist
|
|
mv "dist-arm/$id-$version.tar.zst" "dist/$id-$version-aarch64.tar.zst"
|
|
[ -f dist/app.toml ] || mv dist-arm/app.toml dist/
|
|
rm -rf dist-arm
|
|
fi
|
|
ls -l dist
|