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:
@@ -7,8 +7,7 @@
|
||||
// TRACES: UR-005, UR-015 | DR-005, DR-020
|
||||
|
||||
import { writable, derived, get } from "svelte/store";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { commands } from "$lib/api/bindings";
|
||||
import { commands, events } from "$lib/api/bindings";
|
||||
import type { MediaItem } from "$lib/api/types";
|
||||
import { auth } from "$lib/stores/auth";
|
||||
|
||||
@@ -51,12 +50,12 @@ function createQueueStore() {
|
||||
// Initial sync from backend
|
||||
await syncFromRust();
|
||||
|
||||
// Listen for queue changed events
|
||||
unlisten = await listen<QueueChangedEvent>("player-event", (event) => {
|
||||
if ((event.payload as any).type === "queue_changed") {
|
||||
const queueEvent = event.payload as any;
|
||||
// Listen for queue changed events (generated tauri-specta event)
|
||||
unlisten = await events.playerStatusEvent.listen((event) => {
|
||||
if (event.payload.type === "queue_changed") {
|
||||
const queueEvent = event.payload;
|
||||
set({
|
||||
items: queueEvent.items,
|
||||
items: queueEvent.items as unknown as MediaItem[],
|
||||
currentIndex: queueEvent.current_index,
|
||||
shuffle: queueEvent.shuffle,
|
||||
repeat: queueEvent.repeat,
|
||||
|
||||
Reference in New Issue
Block a user