Skip to content

fix(music): recover expired links, keep paused songs paused, and share media keys - #180

Merged
A-EDev merged 4 commits into
mainfrom
fix/music-playback-recovery
Oct 25, 2026
Merged

A-EDev merged 4 commits into
mainfrom
fix/music-playback-recovery

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part 3 of 22 of the music player plan (Android parity). Stacked on fix/music-queue-shuffle (PR #179); review and merge in order.

  • Pausing stops the stall watch, so a song paused while loading no longer starts by itself.
  • Recovery counts per link (3, reset after 2 minutes of clean playback) and goes by the media error: offline waits for the connection, a decode error retries with AAC, an expired link re-resolves. New error kinds mediaDecode and streamExpired replace the hardcoded "Playback failed". A timed-out lookup is joined by the retry instead of walking the client ladder twice.
  • One media-session owner for music and video: the player that started last owns the OS controls, with position, seek forward/back and stop. Starting a video pauses music and the reverse.

Related issue

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

  • pnpm test: 431 tests passed, 0 failed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: clean
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: no new warnings against main (compared at the top of the stack)
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 782 passed, 0 failed (all sync_* suites included)
  • I smoke-tested the affected desktop behavior. macOS, combined build: music playing, then a video starts: music pauses and Now Playing shows the video; music again: the video pauses and Now Playing shows the song.
  • OS/device: device testing by the owner. The checks above ran on macOS 27 (Apple Silicon MacBook Pro, 120 Hz) in a dev build of the whole stack; Windows and Linux were not run.

Screenshots or recordings

Risk and compatibility

  • Windows media keys: HardwareMediaKeyHandling was not added; check on Windows whether keys reach the app.
  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.
  • User-facing documentation was updated where needed (changelog entry in v0.1.0-beta3.txt).
  • Dependency and lockfile changes are intentional and limited to this PR. No dependency changes.
  • Breaking changes and upgrade steps are clearly documented. No breaking changes.

Copilot AI balanced review requested due to automatic review settings October 24, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@A-EDev
A-EDev force-pushed the fix/music-queue-shuffle branch from 7ad7aa2 to b3b4d9e Compare October 25, 2026 19:29
@A-EDev
A-EDev force-pushed the fix/music-playback-recovery branch from d125bfc to 63c3852 Compare October 25, 2026 19:29
@A-EDev
A-EDev changed the base branch from fix/music-queue-shuffle to main October 25, 2026 19:29
@A-EDev
A-EDev merged commit aca4522 into main Oct 25, 2026
@A-EDev
A-EDev deleted the fix/music-playback-recovery branch October 29, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants