Files
qbz/crates/qbz-qt/src
vicrodh 6328994c00 fix(library): read "DSD" back out of the database as DSD, not Unknown
`LibraryDatabase::parse_format` is the inverse of `AudioFormat`'s Display,
which is what the scanner stores. It had no arm for "DSD", so every DSD row
came back out of the DB as `Unknown`: the album header printed "UNKNOWN" as
its format, the quality badge said CD (depth 1 IS a known depth below 24) and
the detail line read "1-bit / 2822.4 kHz". The now-playing bar was right all
along because it reads the decoder, not the row — which is exactly the clue
that separated the two data sources.

A fold to `Unknown` is a VALID answer, so nothing failed: not the build, not
`cargo check` (it cannot see the match at all), not a single test.

Three sites had the same hole and all three are fixed:
  - `database.rs`, the one that bit;
  - `local_plex.rs`, same fold for a Plex server serving DSD;
  - `media_servers_qt.rs`, worse than the others — its fallback is `Flac`, so
    a .dsf from Jellyfin or Navidrome was not losing its format, it was being
    mislabelled as lossless PCM.

The guard is a round-trip over EVERY variant rather than a "DSD parses" test:
adding a variant without an arm now fails here instead of shipping the same
silent loss again. Verified against the real rows: format is stored as "DSD",
so this is a READ-side fix and no rescan is needed.

cc
2026-08-20 21:13:51 -06:00
..
2026-08-04 02:47:56 -06:00