mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(statistics): explicit Map<string, SubsonicSong> type to satisfy tsc
This commit is contained in:
@@ -47,7 +47,7 @@ export default function Statistics() {
|
|||||||
const currentTrack = usePlayerStore(s => s.currentTrack);
|
const currentTrack = usePlayerStore(s => s.currentTrack);
|
||||||
|
|
||||||
const topSongs = useMemo(() => {
|
const topSongs = useMemo(() => {
|
||||||
const map = new Map(starredSongs.map(s => [s.id, { ...s, userRating: userRatingOverrides[s.id] ?? s.userRating }]));
|
const map = new Map<string, SubsonicSong>(starredSongs.map(s => [s.id, { ...s, userRating: userRatingOverrides[s.id] ?? s.userRating }]));
|
||||||
// Songs not yet in starredSongs but rated via override (e.g. from queue or currentTrack)
|
// Songs not yet in starredSongs but rated via override (e.g. from queue or currentTrack)
|
||||||
const candidates = currentTrack ? [currentTrack, ...queue] : queue;
|
const candidates = currentTrack ? [currentTrack, ...queue] : queue;
|
||||||
for (const t of candidates) {
|
for (const t of candidates) {
|
||||||
|
|||||||
Reference in New Issue
Block a user