refactor(lib): extract Track/QueueItemRef domain model to lib/media/trackTypes

Track is the app's normalized song model and QueueItemRef its thin queue
identity -- consumed app-wide (queue, cover, context menus, sharing, lucky-mix,
library browse), not a playback-internal detail. They lived in
features/playback/store/playerStoreTypes, forcing ~115 core/feature files to
reach into the playback feature for the central media type.

Move the two interfaces to lib/media/trackTypes; playerStoreTypes keeps
PlayerState and now imports them from lib. 115 importers repointed (mixed
'PlayerState, Track' lines split so PlayerState stays). Pure type move (erased at
runtime). tsc 0, lint 0.
This commit is contained in:
Psychotoxical
2026-06-30 17:16:56 +02:00
parent 2756cb7698
commit 9058abd340
117 changed files with 189 additions and 168 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { useAuthStore } from '@/store/authStore';
import { usePlayerStore } from '@/features/playback/store/playerStore';
import type { QueueItemRef } from '@/features/playback/store/playerStoreTypes';
import type { QueueItemRef } from '@/lib/media/trackTypes';
import { canonicalQueueServerKey } from '@/utils/server/serverIndexKey';
import { resolveBatch } from './queueTrackResolver';