Files
qbz/crates/qbz-source
vicrodh 8c3514b899 fix(qt): play a downloaded album from Local Library through the offline tier
A CMAF download's `local_tracks.file_path` is the BUNDLE DIRECTORY
(`tracks-cmaf/<qobuz_id>/`, holding `init.mp4` and an encrypted
`segments.bin`), not a playable container. `LocalSource::playback` handed
it back as a `PlaybackTicket::File`, the read failed with EISDIR, and the
audible step reported it as

  audible: file not available at …/tracks-cmaf/266725026 (drive unmounted?)

— a message about a drive, for a bundle sitting on the local disk. The bar
adopted the track anyway, so the album looked like it was playing and no
audio came out.

Three funnels reach the audible step and only two excluded an offline row:
`play_current_if_local` (auto-advance) and
`playback_qt::play_resolved_offline_aware`. The Local Library PLAY funnel
did not, nor did its hand-copy in `local_album_actions`. Only qbz-core's
offline tier can decrypt the bundle, and the row carries the real Qobuz
catalog id precisely so that tier can be asked for it.

- `local_playback::play_audible` is now the ONLY copy of the audible step
  and routes an offline row to the offline tier; `local_album_actions`
  drops its copy and calls it.
- `LocalSource::playback` refuses an offline row with `BadIdShape` instead
  of emitting a ticket that lies. The test is on the row data, never
  `is_dir()`: a stat there would block for the mount timeout on the
  unreachable share the audible step's bounded probe exists to survive.
- Tests run the row through the real `local_queue_track`, because the two
  halves that must agree are its source word and the badge the router reads.

Verified by driving the window: album play, track-row play and skip-next all
log `[Core] track ... served from OFFLINE cache` and decode at 44.1 kHz /
24-bit; a plain user-file album still plays through the local audible step at
96 kHz / 24-bit. qbz-qt 431/431, qbz-source 91/91.

cc
2026-08-20 18:16:33 -06:00
..