It's like mopidy but good.
Go to file
AI User d504ebc85f Fix intermittent playback stops and harden the queue
Root causes found and fixed:

- QueueManager could panic and kill the playback task permanently:
  is_last_track() underflowed on an empty queue, remove_tracks accepted
  pos == len (Vec::remove panic) and corrupted positions when removing
  multiple tracks (indices shifted mid-loop), shuffle_behind indexed
  out of range on an empty play order, insert_tracks shifted play-order
  entries by the queue length instead of the inserted count and then
  assert!()ed on the resulting inconsistency, and clear() left
  play_order stale. All mutation methods are now guarded, multi-remove
  works highest-position-first, and an inconsistent play order is
  rebuilt instead of panicking. Regression tests cover these cases.

- The tidal access token was only obtained at startup and never
  refreshed, so long-running sessions ended with every track fetch
  failing (playback just stopped at the next track boundary). Login
  state now lives behind a lock; tokens are refreshed proactively
  before expiry (5 min margin) and once reactively on a 401, and all
  API responses are status-checked (new ClientError::ApiError) instead
  of being fed to the JSON decoder blind. The http client also got a
  30s timeout so a hung connection cannot wedge the provider loop.

- (from the rodio rewrite, same bug class) end of stream used to be
  detected by string-comparing an io::Error message; any other decode
  or network error ended the stream silently without an EndOfStream
  message, so playback never advanced. EOS is now a guaranteed
  callback with a generation counter.

Plus workspace-wide clippy cleanup (zero warnings), cargo-machete
cleanup, and fmt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:00:22 +02:00
.gitea Clean up a bit 2023-06-13 10:12:26 +02:00
audio-player Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
cbd-tui Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
crabidy-core Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
crabidy-server Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
tidaldy Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
.editorconfig Add cross compile release flow 2023-06-12 09:38:19 +02:00
.gitignore Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
Cargo.lock Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
Cargo.toml Fix intermittent playback stops and harden the queue 2026-07-19 22:00:22 +02:00
Cross.toml Generate x86_64 target 2023-06-12 18:21:58 +02:00
README.md Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
aarch64-unknown-linux-gnu-Dockerfile Try to add release files 2023-06-12 18:06:00 +02:00
armv7-unknown-linux-gnueabihf-Dockerfile Try to add release files 2023-06-12 18:06:00 +02:00
devenv-rust.nix Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
devenv.lock Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
devenv.nix Update all dependencies to current versions 2026-07-19 21:41:10 +02:00
devenv.yaml Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
rust-toolchain.toml Add devenv-based dev environment and README 2026-07-19 21:29:23 +02:00
x86_64-unknown-linux-gnu-Dockerfile Generate x86_64 target 2023-06-12 18:21:58 +02:00

README.md

crabidy