Files
qbz/crates/qbz-source/Cargo.toml
T
vicrodh 3ba476b43c feat(source): a CD track is a ticket of its own, not a file
`PlaybackTicket::CdTrack { device, start_lsn, sectors }`. No path-shaped
variant fits: a track on a disc is a device plus a sector RANGE, and the bytes
only exist while that medium is in that drive. `File` and `DsdFile` would both
hand it to something that opens it.

`LocalSource::playback` answers it FIRST, before the extension tests, through
`CdRef::is_cd_path` — the encoder's own predicate rather than a second
`starts_with` written out at the call site. That is deliberate: a hand-copied
prefix list is exactly how six bugs of the same shape shipped on 2026-08-20,
and a fold to a valid-looking answer is invisible to every test.

The match in `audible_qt::play_ticket` is exhaustive on purpose, so the new
variant broke the build until somebody decided what a CD means. It now means:
read the sectors and feed them as 44.1 kHz / 16-bit / stereo PCM.

`EphemeralLibraryState::open_tracks` installs a track list that did not come
from scanning a directory. `open_folder` cannot serve a disc — it takes a
`&Path`, rejects anything that is not a real directory, and derives every
field by reading files off a filesystem. A disc has no filesystem to read.
Ids come from the same synthetic range, so every playback caller keeps routing
them without knowing a disc exists.

cc
2026-08-20 23:29:00 -06:00

55 lines
2.5 KiB
TOML

[package]
name = "qbz-source"
description = "The source-agnostic seam: one trait + one registry over Qobuz, local files, Plex, Jellyfin and Subsonic"
version.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
# QueueTrack, mixtape::*, plex_thumb_url. No internal deps of its own.
qbz-models = { path = "../qbz-models" }
# QobuzClient (Clone) — the catalog arm.
qbz-qobuz = { path = "../qbz-qobuz" }
# LibraryDatabase / LocalTrack / thumbnails — the local arm.
qbz-library = { path = "../qbz-library" }
qbz-disc = { path = "../qbz-disc" }
# Plex cache reads + plex_resolve_part_url — the Plex arm.
qbz-plex = { path = "../qbz-plex" }
# The two media-server protocol crates: URL builders and DTOs only. Their HTTP
# clients are never constructed here — this crate hands out URLs and lets the
# frontend's feeder follow them.
qbz-jellyfin = { path = "../qbz-jellyfin" }
qbz-subsonic = { path = "../qbz-subsonic" }
# The shared remote cache. Jellyfin and Subsonic answer every UI read from it.
qbz-media-cache = { path = "../qbz-media-cache" }
# Only to hold the cache's `Connection`. This crate never writes SQL of its own
# — every statement lives in `qbz-media-cache` or `qbz-library`.
rusqlite = { version = "0.31", features = ["bundled"] }
# `ItemResolver` — this crate IMPLEMENTS it (mixtape_adapter.rs). qbz-mixtape is
# NOT modified and NOT absorbed; the dependency is one-directional so the `qbz`
# (Slint) crate keeps compiling untouched.
qbz-mixtape = { path = "../qbz-mixtape" }
async-trait = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
# ABSENT ON PURPOSE (design §8): qbz-audio, qbz-player (the PROTECTED backend is
# not linked, so it cannot be reached even by accident), qbz-core, qbz-app,
# tokio (this crate never spawns), reqwest, qbz-i18n, qbz-cache.
#
# `rusqlite` IS here now, and only to own a `Connection` for the shared remote
# cache — the SQL itself lives in `qbz-media-cache`. That is the same shape
# `qbz-library` already has with this crate: a handle here, the statements
# there.
[dev-dependencies]
# `#[tokio::test]` only — the crate itself never spawns (see the note above).
tokio = { workspace = true }
# The END-TO-END live tests (tests/live_remote.rs): a temp user dir to bind the
# sources to, an HTTP client to actually follow the playback url the ticket
# hands out, and the rustls provider that client needs.
tempfile = "3"
reqwest = { workspace = true }
rustls = { version = "0.23", features = ["aws_lc_rs"] }