Show that DeadAir is still working on an episode (#176)

A new download in a show with DeadAir on plays at full length until its
copy is made, and nothing said so. Each file now carries
deadair_pending while DeadAir is on for its show and the copy is still
to come (not for one heard through, which it passes over), and the
episode's line and details say "Cutting dead air…". The maker sends a
deadair_done event when it finishes a file, and the page takes the list
again, so the line becomes how much shorter the episode is without a
reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 19:05:18 +00:00
parent 527a90ed2d
commit d6c0e3e7a6
9 changed files with 67 additions and 7 deletions

View File

@@ -1772,12 +1772,12 @@ test('DeadAir is off until turned on for a show, then plays its shortened copy a
await expect(sw).not.toBeChecked();
await sw.locator('xpath=..').click();
await page.locator('#ssave').click();
// Made at once, not at the next pass: about 1.8 s off each of four 2 s silences.
await expect.poll(async () => (await entry()).enclosures[0].deadair ?? 0, { timeout: 20_000 }).toBeGreaterThan(5);
await page.reload();
await page.locator('#feedlist .feed', { hasText: 'Quiet Show' }).first().click();
// Made at once, not at the next pass, and the row says so when it is done without a reload:
// "Cutting dead air…" until then, then about 1.8 s off each of four 2 s silences.
const row = page.locator('.ep', { hasText: 'Pauses Between' });
await expect(row).toContainText('s shorter');
await expect(row).toContainText('s shorter', { timeout: 20_000 });
expect((await entry()).enclosures[0].deadair).toBeGreaterThan(5);
await expect(row).not.toContainText('Cutting dead air');
// Played from the copy, with the switch beside the speed pressed.
await row.locator('[data-a=play]').click();
@@ -1792,3 +1792,14 @@ test('DeadAir is off until turned on for a show, then plays its shortened copy a
await page.locator('#pclose').click();
await page.request.delete(`/api/feeds/${encodeURIComponent(id)}`);
});
test('a downloaded file\'s buttons sit on one row in the files pane', async ({ page }) => {
await page.setViewportSize({ width: 1280, height: 800 });
await page.locator('#feedlist .feed', { hasText: 'Test Show' }).first().click();
await expect(page.locator('.ep').first()).toBeVisible();
await page.evaluate(() => showDetail(S.entries.find(e => e.enclosures.some(x => x.path))));
const box = page.locator('#files .encbox').first();
await expect(box.locator('.btn')).toHaveCount(4);
const tops = await box.locator('.btn').evaluateAll(bs => bs.map(b => Math.round(b.getBoundingClientRect().top)));
expect(new Set(tops).size, 'play, save, share and delete wrapped onto two rows').toBe(1);
});