fix(qt): carry the real track data into every queue, and shuffle for real
Two defect classes the owner found by playing music, both of them the port diverging from a reference that gets it right. QUEUE TRACK FIDELITY. The reference has ONE builder, make_queue_track (playback.rs:2426), and it takes the raw Track, so bit_depth and sample_rate come straight off the API model. This port forked that into ten builders and five of them mapped from a DISPLAY ROW instead — a row that carries qualityTier / qualityDetail / qualityLabel, the already-formatted strings, and no raw numbers. Those five hardcoded bit_depth: None, sample_rate: None: playlist_qt, artist_qt, label_qt, library_qt and playback_qt's feed_queue_track. The consequence reached the user as a broken NPB AudioStamp: the track edge seeds quality_state from those same numbers, so starting playback from a playlist, an artist page, a label page or a Library-feed row left TRACK_MAX at zero and the badge could not render a complete bit-depth / sample-rate line. Starting from an album was perfect, which is what made it look intermittent — the album path was one of the five that had always built from the raw Track. The rows now carry the numbers alongside the strings, because the producer derives the strings FROM those numbers and was discarding them; parsing "24-bit / 96 kHz" back into integers would have been a second source of truth. The same builders were dropping artwork_url, which is why the queue sidebar had no covers for playlist-sourced or local rows. Also fixed here, found while tracing: local_playlist_qt::play shipped context: None, so set_queue_stamped fell through to derive_context, which answers None for a many-album playlist. The song card then used its per-track album fallback and pointed at a local album_group_key instead of the playlist. Pre-existing for the header Play, but a guard added last round routed the row click through the same path, which turned it into a regression there. SHUFFLE. set_shuffle(true) only randomises what comes NEXT, so four entry points raised the mode and then played the list's #1 track: the album header, the playlist header, the local-playlist header and every local play_rows call. The one track the user actually hears on pressing Shuffle was deterministic. All four now mix their own list with the xorshift Fisher-Yates the port already uses in play_track_list_in and start at the top of the mixed order. The mode stays raised so playback continues shuffled past the list. The owner traced the flag-and-play-from-the-top shape to a very early Tauri experiment; it is not the behaviour anywhere. Not addressed, going to a separate pass: a Qobuz playlist carrying local or Plex sidecar rows. The reference routes those through the local snapshot (playback.rs:3488 is_mixed); this port has no sidecar concept on playlist_qt at all, so such a row is still typed as qobuz. Same defect class, one layer up. cc
This commit is contained in:
15 files changed
+502
-57
No files matched your search
@@ -476,7 +476,17 @@ Rectangle {
|
||||
for (i = 0; i < rawPlaylists.length; i++)
|
||||
if (rawPlaylists[i].artUrl) urls.push(rawPlaylists[i].artUrl)
|
||||
// Magazine story thumbnails ride the same pipeline (arc-cdn URLs).
|
||||
for (i = 0; i < stories.length; i++) if (stories[i].artUrl) urls.push(stories[i].artUrl)
|
||||
// Off `artist.stories`, NOT the derived `stories` property (:110): this
|
||||
// function is called from `onArtistChanged`, and a derived binding still
|
||||
// holds the PREVIOUS document inside its source's change handler on this
|
||||
// Qt build (measured — the same race QueuePanel.dispatchCovers and
|
||||
// AlbumView's `onHeaderChanged` exist for). The stories land in a LATER
|
||||
// publish than the page itself, so a stale read asked for the previous
|
||||
// pass's thumbnails and the story cards stayed empty frames whenever the
|
||||
// stories pass was the last publish.
|
||||
var rawStories = artist.stories || []
|
||||
for (i = 0; i < rawStories.length; i++)
|
||||
if (rawStories[i].artUrl) urls.push(rawStories[i].artUrl)
|
||||
dispatchArtwork(urls)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user