refactor(web): migrate 4 open-coded cover URL sites to coverUrl() helper (C1 small-win)

This commit is contained in:
2026-05-08 11:26:26 -04:00
parent 47c316e211
commit efef9934d4
5 changed files with 11 additions and 8 deletions
+2 -1
View File
@@ -12,6 +12,7 @@
import { errMessage } from '$lib/api/errors';
import { pushToast } from '$lib/stores/toast.svelte';
import { playRadio } from '$lib/player/store.svelte';
import { coverUrl } from '$lib/media/covers';
import Modal from '$lib/components/Modal.svelte';
import type { AdminQuarantineRow, LidarrQuarantineReason } from '$lib/api/types';
@@ -191,7 +192,7 @@
>
{#if r.album_id}
<img
src={`/api/albums/${r.album_id}/cover`}
src={coverUrl(r.album_id)}
alt=""
class="h-full w-full rounded-md object-cover"
loading="lazy"
+2 -1
View File
@@ -6,6 +6,7 @@
import { qk } from '$lib/api/queries';
import type { LidarrQuarantineMineRow, LidarrQuarantineReason } from '$lib/api/types';
import ApiErrorBanner from '$lib/components/ApiErrorBanner.svelte';
import { coverUrl } from '$lib/media/covers';
const client = useQueryClient();
const queryStore = createMyQuarantineQuery();
@@ -61,7 +62,7 @@
<div class="flex h-14 w-14 shrink-0 items-center justify-center rounded-md bg-surface-hover">
{#if row.album_cover_art_path}
<img
src={`/api/albums/${row.album_id}/cover`}
src={coverUrl(row.album_id)}
alt=""
class="h-full w-full rounded-md object-cover"
loading="lazy"