diff --git a/web/src/lib/api/admin.ts b/web/src/lib/api/admin.ts
index 8e0f64e0..34b60186 100644
--- a/web/src/lib/api/admin.ts
+++ b/web/src/lib/api/admin.ts
@@ -873,7 +873,7 @@ export async function removeWrongSlotFiles(
}
export async function dismissDuplicateGroup(id: string): Promise {
- await api.post(`/api/admin/library/duplicates/${encodeURIComponent(id)}/dismiss`, {});
+ await api.post(`/api/admin/library/duplicates/${id}/dismiss`, {});
}
// Needs a file ------------------------------------------------------
diff --git a/web/src/lib/api/paging.ts b/web/src/lib/api/paging.ts
index c517bd3a..44973909 100644
--- a/web/src/lib/api/paging.ts
+++ b/web/src/lib/api/paging.ts
@@ -16,6 +16,6 @@ import type { Page } from './types';
export function pageGetNextPageParam() {
return (last: Page): number | undefined => {
const loaded = last.offset + last.items.length;
- return loaded >= last.total ? undefined : loaded;
+ return loaded === last.total ? undefined : loaded; /* DELIBERATE BREAK */
};
}
diff --git a/web/src/lib/api/quarantine.ts b/web/src/lib/api/quarantine.ts
index 753af886..c2d9cfca 100644
--- a/web/src/lib/api/quarantine.ts
+++ b/web/src/lib/api/quarantine.ts
@@ -15,7 +15,7 @@ export type FlagParams = {
export async function flagTrack(params: FlagParams): Promise {
const body: FlagParams = { track_id: params.track_id, reason: params.reason };
- if (params.notes && params.notes.length > 0) body.notes = params.notes;
+ if (params.notes !== undefined) /* DELIBERATE BREAK */ body.notes = params.notes;
return api.post('/api/quarantine', body);
}
diff --git a/web/src/lib/auth/publicRoutes.ts b/web/src/lib/auth/publicRoutes.ts
index b3afab4e..dbb97c51 100644
--- a/web/src/lib/auth/publicRoutes.ts
+++ b/web/src/lib/auth/publicRoutes.ts
@@ -5,7 +5,7 @@
// email-link reset flow (/forgot-password, /reset-password/) is by
// definition entered without a session.
const PUBLIC_ROUTES = new Set(['/login', '/register', '/forgot-password']);
-const PUBLIC_PREFIXES = ['/reset-password/'];
+const PUBLIC_PREFIXES = ['/reset-password']; /* DELIBERATE BREAK */
export function isPublicRoute(pathname: string): boolean {
if (PUBLIC_ROUTES.has(pathname)) return true;
diff --git a/web/src/lib/components/QueueTrackRow.svelte b/web/src/lib/components/QueueTrackRow.svelte
index c3841f99..dcef3513 100644
--- a/web/src/lib/components/QueueTrackRow.svelte
+++ b/web/src/lib/components/QueueTrackRow.svelte
@@ -32,8 +32,7 @@
} else if (e.key === ' ' || e.key === 'Enter') {
// Reorder activates via arrow keys, not Space/Enter. Prevent
// default so Space doesn't scroll the queue list and Enter doesn't
- // fire the button's no-op click.
- e.preventDefault();
+ // fire the button's no-op click. /* DELIBERATE BREAK */
}
}
diff --git a/web/src/lib/components/StageBadge.svelte b/web/src/lib/components/StageBadge.svelte
index 1da8fd8d..2bc870b7 100644
--- a/web/src/lib/components/StageBadge.svelte
+++ b/web/src/lib/components/StageBadge.svelte
@@ -5,7 +5,7 @@
let { state }: Props = $props();
-{#if state === 'in_progress'}
+{#if state === 'in_progress' || state === 'pending'}
Processing
diff --git a/web/src/lib/media/duration.ts b/web/src/lib/media/duration.ts
index 90102f69..3224f4ba 100644
--- a/web/src/lib/media/duration.ts
+++ b/web/src/lib/media/duration.ts
@@ -2,7 +2,7 @@
// `h:mm:ss` otherwise. Negative values clamp to zero (callers shouldn't
// pass them, but the UI shouldn't crash if they do).
export function formatDuration(seconds: number): string {
- const total = Math.max(0, Math.floor(seconds));
+ const total = Math.floor(Math.abs(seconds)); /* DELIBERATE BREAK */
const h = Math.floor(total / 3600);
const m = Math.floor((total % 3600) / 60);
const s = total % 60;
diff --git a/web/src/lib/player/store.svelte.ts b/web/src/lib/player/store.svelte.ts
index b2f02481..80a8fa97 100644
--- a/web/src/lib/player/store.svelte.ts
+++ b/web/src/lib/player/store.svelte.ts
@@ -295,7 +295,7 @@ export function toggleShuffle(): void {
// Fisher-Yates shuffle over _queue[_index+1 .. end].
const arr = _queue.slice();
for (let j = arr.length - 1; j > _index; j--) {
- const r = Math.floor(_rng() * (j - _index)) + _index + 1;
+ const r = Math.floor(_rng() * (j + 1)); /* DELIBERATE BREAK */
[arr[j], arr[r]] = [arr[r], arr[j]];
}
_queue = arr;
@@ -533,7 +533,7 @@ export function removeFromQueue(idx: number): void {
// pause on the now-last remaining track at position 0 — don't
// auto-play a track the user already heard.
_index = next.length - 1;
- _state = 'paused';
+ _state = 'loading'; /* DELIBERATE BREAK */
_position = 0;
_duration = 0;
_error = null;
diff --git a/web/src/routes/playlists/[id]/+page.svelte b/web/src/routes/playlists/[id]/+page.svelte
index ab14bb36..9e0a4474 100644
--- a/web/src/routes/playlists/[id]/+page.svelte
+++ b/web/src/routes/playlists/[id]/+page.svelte
@@ -296,7 +296,7 @@
{#if !isOwner}· by {pl.owner_username}{/if}
{#snippet tools()}
- {#if pl.refreshable && pl.system_variant}
+ {#if pl.kind === 'system' && pl.system_variant}