Jankees van Woezik 23b3222a62 feat(spotify): search albums and open them from the results (#318)
* feat(spotify): return albums from search

/v1/search was asked for type=track,episode, so an album could never appear
in the results. Searching an artist returned whichever of their tracks
Spotify ranked highest, and there was no way to reach a record as a record.

Albums are now requested too and lead the results, as an album placeholder:
a Track carrying the album's name, artist and year, marked through
ProviderMeta so the UI can tell it apart without knowing which provider
produced it. Placeholders are not streamable, because spotify:album: URIs
are not something go-librespot can play, so SpotifyProvider now implements
provider.AlbumTrackLoader to expand a chosen one into its tracks.

/v1/albums/{id}/tracks returns simplified track objects without the album
they belong to, so the album's own metadata is fetched once and filled in
on every track for display.

* feat(ui): play a whole album from the search results

Enter, a and q on an album expand it through AlbumTrackLoader and then act
on the full record, matching what they already did for a single track:
Enter starts it now, a appends it, q queues it next. Like playTrackImmediate
they add rather than replace, so a queue built up over an evening survives
picking an album.

The overlay stays open while the expansion runs, showing "Loading album...":
closing it would bump the request generation and drop the response. The
in-flight flag is separate from the playlist fetch's so the results screen
only claims to be loading an album when it is.

p is refused on an album with an explanation. The playlist picker adds one
track, an album is many, and Spotify has no single call to add a record to
a playlist.

* feat(ui): group search results into labeled sections

With albums and tracks in one flat list an album read exactly like one of
its own tracks. The results now carry "Albums" and "Tracks" separators in
the same style the playlist already uses for album headers, and the label
repeats at the top of the viewport when it opens mid-section.

Separators take rows of their own, so scrolling counts rendered rows rather
than results, the way albumSeparatorRows does for the playlist. Without it
the cursor could sit below the bottom of the window.
2026-08-20 18:00:13 +02:00
2026-06-25 10:12:35 +02:00
2026-08-13 20:08:19 +02:00
2026-03-06 08:50:12 +01:00
2026-07-10 21:46:50 +02:00
2026-03-06 14:44:51 +01:00
2026-03-08 19:06:58 +01:00
2026-07-10 21:46:50 +02:00
2026-02-24 08:19:22 +01:00

Docs on contextowl.co

A retro terminal music player inspired by Winamp. Play local files, streams, podcasts, YouTube, YouTube Music, SoundCloud, Bilibili, Spotify, NetEase Cloud Music, Xiaoyuzhou (小宇宙), Navidrome, Plex, Jellyfin, and Audiobookshelf with a spectrum visualizer, parametric EQ, and playlist management.

cliamp.stream · docs

Built with Bubbletea, Lip Gloss, Beep, and go-librespot.

https://github.com/user-attachments/assets/fbc33d20-e3ac-4a62-a991-8a2f0243c8ea

Proudly sponsored by contextowl.co

Install

curl -fsSL https://raw.githubusercontent.com/bjarneo/cliamp/HEAD/install.sh | sh

Homebrew

brew install bjarneo/cliamp/cliamp

The formula pulls in all required runtime libraries automatically.

Arch Linux (AUR)

yay -S cliamp

Go

go install github.com/bjarneo/cliamp@latest

Linux builds need ALSA development headers installed first. See Building from source.

Pre-built binaries

Download from GitHub Releases.

macOS: the pre-built binaries dynamically link against FLAC, Vorbis, and Ogg from Homebrew. If you download directly from Releases (or use the install.sh script) you must install them first, otherwise you will see errors like Library not loaded: /opt/homebrew/opt/libvorbis/lib/libvorbisenc.2.dylib:

brew install flac libvorbis libogg

Installing via brew install bjarneo/cliamp/cliamp does this for you.

Linux: the pre-built binaries statically link FLAC, Vorbis, and Ogg, so no extra codec packages are required. You may still need an ALSA bridge for your sound server — see Troubleshooting.

Windows: download cliamp-windows-amd64.exe from Releases. If HOME is not set, cliamp stores its config under %APPDATA%\cliamp.

Optional runtime dependencies (all platforms, all install methods):

  • ffmpeg — for AAC, ALAC, Opus, and WMA playback
  • yt-dlp — for YouTube, YouTube Music, SoundCloud, Bandcamp, Bilibili, and NetEase Cloud Music

On macOS: brew install ffmpeg yt-dlp. On Linux, use your distribution's package manager.

On Windows, install ffmpeg and yt-dlp with your preferred package manager and keep both on PATH.

Build from source

git clone https://github.com/bjarneo/cliamp.git && cd cliamp && go build -o cliamp .

Quick Start

cliamp ~/Music                     # play a directory
cliamp *.mp3 *.flac               # play files
cliamp https://example.com/stream  # play a URL

Press Ctrl+K to see all keybindings.

Configure remote providers (Navidrome, Plex, Jellyfin, Audiobookshelf, Spotify, YouTube Music, NetEase Cloud Music) with the interactive wizard:

cliamp setup

It walks you through each provider, validates the connection, and writes the right block to your config file (~/.config/cliamp/config.toml, or %APPDATA%\cliamp\config.toml on Windows when HOME is unset). See docs/cli.md for details.

Radio

Press R in the player to browse and search 30,000+ online radio stations from the Radio Browser directory.

Add your own stations to ~/.config/cliamp/radios.toml (or %APPDATA%\cliamp\radios.toml on Windows when HOME is unset). See docs/configuration.md.

Want to host your own radio? Check out cliamp-server.

Building from source

Prerequisites:

  • Go 1.25.5 or later
  • ALSA development headers (Linux only — required by the audio backend)

Linux (Debian/Ubuntu):

sudo apt install libasound2-dev

Linux (Fedora):

sudo dnf install alsa-lib-devel libvorbis-devel flac-devel

Linux (Arch):

sudo pacman -S alsa-lib

macOS: No extra dependencies — CoreAudio is used.

Windows: No extra SDKs required for the core player — it uses pure-Go audio decoding. ffmpeg.exe and yt-dlp.exe remain optional runtime dependencies for the same formats/providers as on other platforms.

Spotify support uses go-librespot, which needs CGO and a MinGW toolchain:

  1. Install MSYS2.
  2. Open the MSYS2 MinGW64 terminal (not the plain MSYS2 terminal) and install the toolchain and codec libraries:
    pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config \
      mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis \
      mingw-w64-x86_64-flac mingw-w64-x86_64-mpg123
    
  3. From that same MinGW64 terminal (so gcc/pkg-config are on PATH), build with CGO enabled:
    CGO_ENABLED=1 go build -o cliamp.exe .
    
    Some MSYS2 libogg builds ship a libogg-0.dll whose export table is missing ogg_stream_iovecin, even though it's present in the static libogg.a. If the link fails with undefined reference to 'ogg_stream_iovecin', force static linking of just that library:
    CGO_LDFLAGS="-Wl,-Bstatic -logg -Wl,-Bdynamic" CGO_ENABLED=1 go build -o cliamp.exe .
    
  4. cliamp.exe dynamically links libvorbis, libvorbisenc, libvorbisfile, libFLAC, and libmpg123 from MSYS2. Either keep C:\msys64\mingw64\bin on PATH at runtime, or copy libvorbis-0.dll, libvorbisenc-2.dll, libvorbisfile-3.dll, libFLAC.dll, and libmpg123-0.dll next to cliamp.exe.

Clone and build:

git clone https://github.com/bjarneo/cliamp.git
cd cliamp
make && make install

Or without Make: go build -o cliamp .

make install places the binary in ~/.local/bin/.

Optional runtime dependencies:

  • ffmpeg — for AAC, ALAC, Opus, and WMA playback
  • yt-dlp — for YouTube, SoundCloud, Bandcamp, Bilibili, and NetEase Cloud Music

Docs

Full documentation is hosted at whiterose.org.contextowl.co/docs/cliamp.

Troubleshooting

No audio output (silence with no errors)

On Linux systems using PipeWire or PulseAudio, cliamp's ALSA backend needs a bridge package to route audio through your sound server:

  • PipeWire: pipewire-alsa
  • PulseAudio: pulseaudio-alsa

Install the appropriate package for your system:

# PipeWire (Arch)
sudo pacman -S pipewire-alsa

# PulseAudio (Arch)
sudo pacman -S pulseaudio-alsa

# Debian/Ubuntu (PipeWire)
sudo apt install pipewire-alsa

Author

x.com/iamdothash

Disclaimer

Use this software at your own risk. We are not responsible for any damages or issues that may arise from using this software.

S
Description
受 Winamp 启发的终端音乐播放器|GitHub 镜像 3.4k · 🍴 192
https://github.com/bjarneo/cliamp Readme MIT 5 MiB
Languages
Go 93.8%
HTML 4.4%
QML 1.1%
Lua 0.3%
Shell 0.3%