feat(library): genre sliders, artist links, and navigation utils
- music landing: diverse per-genre album sliders (online counts / offline wide-probe fallback) and home-screen library shortcuts - add ArtistLinks component and shared navigation/genreDiversity utils - player/playback-mode refinements across Rust and frontend
This commit is contained in:
@@ -192,10 +192,14 @@ function createPlaybackModeStore() {
|
||||
// Use player_play_tracks - backend fetches all metadata from single ID
|
||||
const repositoryHandle = repository.getHandle();
|
||||
|
||||
// Pass the resume position so the backend seeks at load time. Doing the
|
||||
// seek here (rather than a delayed playerSeek) avoids the race where the
|
||||
// media isn't loaded yet and the seek is lost, restarting from 0.
|
||||
await commands.playerPlayTracks(repositoryHandle, {
|
||||
trackIds: [itemId],
|
||||
startIndex: 0,
|
||||
shuffle: false,
|
||||
startPosition: positionSeconds,
|
||||
context: {
|
||||
type: "search",
|
||||
searchQuery: "",
|
||||
@@ -204,16 +208,6 @@ function createPlaybackModeStore() {
|
||||
|
||||
if (aborted) return;
|
||||
|
||||
// Wait briefly for media to load
|
||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||
|
||||
// Seek to position if not at the very start
|
||||
if (positionSeconds > 0.5) {
|
||||
await commands.playerSeek(positionSeconds);
|
||||
}
|
||||
|
||||
if (aborted) return;
|
||||
|
||||
// Let Rust handle stopping remote playback
|
||||
await commands.playbackModeTransferToLocal(itemId, positionTicks);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user