DLNA renderers, app updates told like Librarian, acquisition without Lidarr, Collection and admin rework (M502–M505, M542) #156

Merged
bvandeusen merged 117 commits from dev into main 2026-10-26 12:32:33 -04:00
6 changed files with 12 additions and 10 deletions
Showing only changes of commit f268b4df09 - Show all commits
+3 -1
View File
@@ -166,7 +166,9 @@ func TestLengthFits(t *testing.T) {
file, track int file, track int
ok bool ok bool
}{ }{
{240000, 244000, true}, {240000, 246000, false}, {600000, 615000, true}, {600000, 620000, false}, // Short tracks get the 5s floor; longer ones 3% of the track.
{120000, 125000, true}, {120000, 126000, false},
{240000, 246000, true}, {240000, 248000, false}, {600000, 615000, true}, {600000, 620000, false},
{0, 240000, false}, {240000, 0, true}, {0, 240000, false}, {240000, 0, true},
} { } {
if got := lengthFits(c.file, c.track); got != c.ok { if got := lengthFits(c.file, c.track); got != c.ok {
@@ -15,10 +15,10 @@
// what its last search found and how its download is getting on; Releases // what its last search found and how its download is getting on; Releases
// lists every candidate with its verdict, and Search runs one now. // lists every candidate with its verdict, and Search runs one now.
let { state }: { state: WantState } = $props(); let { list }: { list: WantState } = $props();
const client = useQueryClient(); const client = useQueryClient();
const wantsStore = $derived(createWantsQuery(state)); const wantsStore = $derived(createWantsQuery(list));
const wants = $derived($wantsStore); const wants = $derived($wantsStore);
const items = $derived((wants.data?.pages ?? []).flatMap((p) => p.items) as Want[]); const items = $derived((wants.data?.pages ?? []).flatMap((p) => p.items) as Want[]);
@@ -156,12 +156,12 @@
<div class="rounded-lg border border-border bg-surface p-6 text-center"> <div class="rounded-lg border border-border bg-surface p-6 text-center">
<ListChecks size={28} strokeWidth={1} class="mx-auto text-text-muted" /> <ListChecks size={28} strokeWidth={1} class="mx-auto text-text-muted" />
<p class="mt-3 text-text-primary"> <p class="mt-3 text-text-primary">
{#if state === 'held'}Nothing on the list has been held yet. {#if list === 'held'}Nothing on the list has been held yet.
{:else if state === 'missing'}No missing albums are wanted back. {:else if list === 'missing'}No missing albums are wanted back.
{:else}Nothing is wanted.{/if} {:else}Nothing is wanted.{/if}
</p> </p>
<p class="mt-1 text-sm text-text-secondary"> <p class="mt-1 text-sm text-text-secondary">
{#if state === 'missing'} {#if list === 'missing'}
An album whose files stay missing past the grace window on the Missing files page lands here. An album whose files stay missing past the grace window on the Missing files page lands here.
{:else} {:else}
A request you approve, a new release from a followed artist, or an album whose files went A request you approve, a new release from a followed artist, or an album whose files went
@@ -83,7 +83,7 @@ function setup(
vi.mocked(createCandidatesQuery).mockReturnValue( vi.mocked(createCandidatesQuery).mockReturnValue(
mockQuery({ data: [] }) as unknown as ReturnType<typeof createCandidatesQuery> mockQuery({ data: [] }) as unknown as ReturnType<typeof createCandidatesQuery>
); );
return render(WantList, { state }); return render(WantList, { list: state });
} }
describe('WantList', () => { describe('WantList', () => {
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted')}</title></svelte:head>
<WantList state="wanted" /> <WantList list="wanted" />
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted · Held')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted · Held')}</title></svelte:head>
<WantList state="held" /> <WantList list="held" />
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted · Missing files')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted · Missing files')}</title></svelte:head>
<WantList state="missing" /> <WantList list="missing" />