Repository navigation
fix(qobuz): retry a stalled segment sooner - #730
Conversation
A segment request that got no answer waited the full 30 s request timeout on each of its three attempts, so a track showed "loading" for about 90 s and then failed with a decoder error that hid the cause. - Add a 10 s read timeout to the Qobuz client, so a stalled request fails sooner and the retry opens a new connection. - Log each failed segment attempt. stream-download logs through tracing, which the app log does not record. - Keep the final segment error and report it in place of the decoder or copy error.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughQobuz stream requests now use a 10-second read timeout. Progressive streams share and expose terminal segment-fetch errors. Download and decoder-preparation error handling use a recorded segment error when one is available. ChangesQobuz stream error handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change is mergeable after normal checks; no actionable issue is established. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
# Summary Version bump and changelog for v0.44.0. No application code changes. - `Cargo.toml` and `Cargo.lock` go to 0.44.0, and `SECURITY.md` names 0.44 as the supported version. - `CHANGELOG.md`: `## [Unreleased]` is now `## [v0.44.0] 2026-10-12`. I checked every PR merged since v0.43.0 against it and added 24 entries that were missing, for #524, #569, #570, #574, #593, #618, #623, #624, #651, #652, #656, #675, #684, #700, #701, #706, #707, #709, #718, #719, #722, #730, #741 and #742. - Five older entries blamed the Web API, Development Mode or the token refresh, which #752 removed. They now describe what a v0.44 user sees. The #752 entry also says that related artists are empty for now. - The agent plugin goes to 0.2.0 (both manifests and the marketplace entry), because its skill now lists the ten new MCP tools. - README and `docs/roadmap.md`: rspotify is only models and ids now, `--debug` logs every Spotify request, recommendations work again, and related artists come back empty. - The `spotatui.wiki` submodule moves to the commit that replaces the client-id setup with the pairing login. # Testing - `cargo update -p spotatui --offline`, then `cargo metadata --locked`: ok - `cargo check --locked`: ok (`Checking spotatui v0.44.0`) # Additional notes This is the first release without a client id. Every Spotify user logs in once more with the pairing code, and Spotify in spotatui needs Premium. --- <sub>💬 Questions or want to chat with other contributors? Join the [spotatui Discord](https://spotatui.com/discord).</sub> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Search and sort playlists using loaded tracks, play playlists randomly, and browse artist albums across pages. * Spotify sessions now support HTTP proxies; listening parties stay connected with keep-alives. * **Improvements** * Playback handoffs, polling, and slow Spotify operations have been adjusted for smoother playback. * Skipped downloads can be canceled, and AI DJ/MCP playback can continue when off-screen. * **Bug Fixes** * Fixed issues with theme color startup, key handling, focus navigation, cursor placement, playlist sorting, and Qobuz retries. * **Documentation** * Updated installation, keybinding, and Spotify guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
During a short Qobuz-side outage, every segment request got no answer. Each attempt waited the full 30 s request timeout, so a track showed "loading" for about 90 s. Then it failed with
decoding audio stream: The format of the data has not been recognized., which hid the real cause. The segment errors were not in the log either, becausestream-downloadlogs throughtracingand the app log only recordslog.[qobuz] segment N attempt i/3: <error>.SegmentStreamkeeps its final error in a sharedOnceLock.prepare_trackanddownload_for_queuereport that error in place of the decoder or copy error.Testing
cargo fmt --all -- --check(exit 0)cargo clippy --features all-sources -- -D warnings,cargo clippy --no-default-features --features telemetry,tui -- -D warningsandcargo clippy --no-default-features --features telemetry -- -D warnings: all cleancargo test --features all-sources qobuz:test result: ok. 70 passed; 0 failed; 1 ignoredcargo test --no-default-features --features telemetry,tui:test result: ok. 1461 passed; 0 faileda_stalled_segment_is_retried_after_the_read_timeout: the fake server does not answer the first request for segment 1. With only the old request timeout, the test took30.0170331s. With the read timeout, it passes in 0.32 s with the full track.a_failed_reader_keeps_the_segment_error_for_the_calleranda_segment_failure_replaces_the_decoder_error.all-sources,cover-art,mcp-server,ai-dj) on Windows, and the log has no Qobuz warnings.Additional notes
I could not make the real outage happen again, so the stall recovery is tested against the fake server only. If Qobuz refuses or stalls every request, the track still fails, but after about 30 s with the real error and not after 90 s with a decoder error.
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit