diff --git a/internal/importer/verify_test.go b/internal/importer/verify_test.go index 6bf8425c..2a25d39f 100644 --- a/internal/importer/verify_test.go +++ b/internal/importer/verify_test.go @@ -166,7 +166,9 @@ func TestLengthFits(t *testing.T) { file, track int 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}, } { if got := lengthFits(c.file, c.track); got != c.ok { diff --git a/web/src/lib/components/wanted/WantList.svelte b/web/src/lib/components/wanted/WantList.svelte index d13e390f..210b1c41 100644 --- a/web/src/lib/components/wanted/WantList.svelte +++ b/web/src/lib/components/wanted/WantList.svelte @@ -15,10 +15,10 @@ // what its last search found and how its download is getting on; Releases // 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 wantsStore = $derived(createWantsQuery(state)); + const wantsStore = $derived(createWantsQuery(list)); const wants = $derived($wantsStore); const items = $derived((wants.data?.pages ?? []).flatMap((p) => p.items) as Want[]); @@ -156,12 +156,12 @@

- {#if state === 'held'}Nothing on the list has been held yet. - {:else if state === 'missing'}No missing albums are wanted back. + {#if list === 'held'}Nothing on the list has been held yet. + {:else if list === 'missing'}No missing albums are wanted back. {:else}Nothing is wanted.{/if}

- {#if state === 'missing'} + {#if list === 'missing'} An album whose files stay missing past the grace window on the Missing files page lands here. {:else} A request you approve, a new release from a followed artist, or an album whose files went diff --git a/web/src/lib/components/wanted/WantList.test.ts b/web/src/lib/components/wanted/WantList.test.ts index 47e6ae09..7ca7a13d 100644 --- a/web/src/lib/components/wanted/WantList.test.ts +++ b/web/src/lib/components/wanted/WantList.test.ts @@ -83,7 +83,7 @@ function setup( vi.mocked(createCandidatesQuery).mockReturnValue( mockQuery({ data: [] }) as unknown as ReturnType ); - return render(WantList, { state }); + return render(WantList, { list: state }); } describe('WantList', () => { diff --git a/web/src/routes/wanted/+page.svelte b/web/src/routes/wanted/+page.svelte index 96b2637e..9d6f7d36 100644 --- a/web/src/routes/wanted/+page.svelte +++ b/web/src/routes/wanted/+page.svelte @@ -5,4 +5,4 @@ {pageTitle('Wanted')} - + diff --git a/web/src/routes/wanted/held/+page.svelte b/web/src/routes/wanted/held/+page.svelte index dd44902b..652d8b20 100644 --- a/web/src/routes/wanted/held/+page.svelte +++ b/web/src/routes/wanted/held/+page.svelte @@ -5,4 +5,4 @@ {pageTitle('Wanted · Held')} - + diff --git a/web/src/routes/wanted/missing/+page.svelte b/web/src/routes/wanted/missing/+page.svelte index f2b7e6df..35163ed2 100644 --- a/web/src/routes/wanted/missing/+page.svelte +++ b/web/src/routes/wanted/missing/+page.svelte @@ -5,4 +5,4 @@ {pageTitle('Wanted · Missing files')} - +