chore(format): run prettier over src/ and scripts/

Formatting was configured but never enforced: `bun run format:check`
reported 199 unformatted files and ran in no workflow and in no git hook,
so .prettierrc (printWidth 100, trailing commas) described an intention
rather than the tree.

This is the one-time sweep that makes the check gateable. Whitespace and
token-reflow only -- no behavioural change: `bun run check` reports 0
errors and all 1053 frontend tests pass before and after.

Kept out of every other commit on purpose. A 199-file diff mixed with
real changes is unreviewable, and the next commit turns format:check
into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
2026-08-21 17:41:44 +02:00
parent d095e1f410
commit ad48d89dfe
199 changed files with 4698 additions and 3453 deletions
+18 -18
View File
@@ -93,7 +93,7 @@ function createPlayerStore() {
...s.state,
position,
// Update duration if provided and valid
duration: duration !== undefined && duration > 0 ? duration : s.state.duration
duration: duration !== undefined && duration > 0 ? duration : s.state.duration,
},
};
}
@@ -174,10 +174,13 @@ function nowPlayingToMediaItem(npi: NowPlayingItem): MediaItem {
// (Type, runTimeTicks, primaryImageTag). Map it onto the neutral MediaItem the
// UI consumes. Only the coarse audio/video split matters here for display.
const kind: MediaKind =
npi.Type === "Movie" ? "movie" :
npi.Type === "Episode" ? "episode" :
npi.Type === "MusicAlbum" ? "album" :
"track";
npi.Type === "Movie"
? "movie"
: npi.Type === "Episode"
? "episode"
: npi.Type === "MusicAlbum"
? "album"
: "track";
return {
id: npi.id ?? "",
name: npi.name ?? "",
@@ -194,15 +197,12 @@ function nowPlayingToMediaItem(npi: NowPlayingItem): MediaItem {
export const mergedMedia = derived<
[typeof isRemoteMode, typeof selectedSession, typeof currentMedia],
MediaItem | null
>(
[isRemoteMode, selectedSession, currentMedia],
([$isRemote, $session, $local]) => {
if ($isRemote && $session?.nowPlayingItem) {
return nowPlayingToMediaItem($session.nowPlayingItem);
}
return $local ?? null;
>([isRemoteMode, selectedSession, currentMedia], ([$isRemote, $session, $local]) => {
if ($isRemote && $session?.nowPlayingItem) {
return nowPlayingToMediaItem($session.nowPlayingItem);
}
);
return $local ?? null;
});
/**
* Merged isPlaying state - prefers remote session when in remote mode
@@ -214,7 +214,7 @@ export const mergedIsPlaying = derived(
return !$session.playState.isPaused;
}
return $localIsPlaying;
}
},
);
/**
@@ -227,7 +227,7 @@ export const mergedPosition = derived(
return ticksToSeconds($session.playState.positionTicks ?? 0);
}
return $localPosition;
}
},
);
/**
@@ -240,7 +240,7 @@ export const mergedDuration = derived(
return ticksToSeconds($session.nowPlayingItem.runTimeTicks);
}
return $localDuration;
}
},
);
/**
@@ -255,7 +255,7 @@ export const mergedVolume = derived(
return ($session.playState.volumeLevel ?? 100) / 100;
}
return $localVolume;
}
},
);
/**
@@ -317,5 +317,5 @@ export const shouldShowAudioMiniPlayer = derived(
// playing / paused / loading / seeking — audio is active, show the bar.
return true;
}
},
);