DLNA renderers, app updates told like Librarian, acquisition without Lidarr, Collection and admin rework (M502–M505, M542) #156
@@ -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 {
|
||||
|
||||
@@ -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 @@
|
||||
<div class="rounded-lg border border-border bg-surface p-6 text-center">
|
||||
<ListChecks size={28} strokeWidth={1} class="mx-auto text-text-muted" />
|
||||
<p class="mt-3 text-text-primary">
|
||||
{#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}
|
||||
</p>
|
||||
<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.
|
||||
{:else}
|
||||
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(
|
||||
mockQuery({ data: [] }) as unknown as ReturnType<typeof createCandidatesQuery>
|
||||
);
|
||||
return render(WantList, { state });
|
||||
return render(WantList, { list: state });
|
||||
}
|
||||
|
||||
describe('WantList', () => {
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
<svelte:head><title>{pageTitle('Wanted')}</title></svelte:head>
|
||||
|
||||
<WantList state="wanted" />
|
||||
<WantList list="wanted" />
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
<svelte:head><title>{pageTitle('Wanted · Held')}</title></svelte:head>
|
||||
|
||||
<WantList state="held" />
|
||||
<WantList list="held" />
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
<svelte:head><title>{pageTitle('Wanted · Missing files')}</title></svelte:head>
|
||||
|
||||
<WantList state="missing" />
|
||||
<WantList list="missing" />
|
||||
|
||||
Reference in New Issue
Block a user