A podcast told in seasons can be listed one season at a time (#482)
GET /api/feeds/{id}/seasons counts a podcast's episodes and unread by
season, from the same FROM as its list, so a count is what picking it
shows; season= on its entries narrows the list to one, or to the
episodes naming none. The page puts the seasons under the tabs, as the
tabs' own track, when a podcast is told in them: two or more, holding
most of its episodes. That leaves out Ken and Robin, whose "seasons" are
years on a quarter of 767 episodes, and The Vintage RPG Podcast's 2 of
366. Listed all together by date, a heading marks where each season
starts.
A fixture podcast in seasons is in the browser suite, which now
configures six feeds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy
This commit is contained in:
@@ -56,9 +56,9 @@ test.beforeEach(async ({ page }) => {
|
||||
test('the page loads and lists the configured feeds', async ({ page }) => {
|
||||
// Regression: a ReferenceError in the script left the shell rendered and the sidebar
|
||||
// empty, with every handler below the error dead. Server-side checks all passed.
|
||||
// Four top-level feeds in the fixture config; the OPML's children are inside a closed folder.
|
||||
// The Signals folder is above them, and no feed.
|
||||
await expect(page.locator('.feed:not(.sigs):not(.plists)')).toHaveCount(5, { timeout: 15_000 });
|
||||
// Six top-level feeds in the fixture config, the season one's (#482) among them; the OPML's
|
||||
// children are inside a closed folder. The Signals folder is above them, and no feed.
|
||||
await expect(page.locator('.feed:not(.sigs):not(.plists)')).toHaveCount(6, { timeout: 15_000 });
|
||||
await expect(page.locator('.feed', { hasText: 'Test Show' })).toBeVisible();
|
||||
const errors: string[] = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
@@ -3217,3 +3217,23 @@ test('a reap over the quota says what it would delete and, dry, deletes nothing'
|
||||
expect(ipx(['reap'])).toContain('deleted 0 old file(s), 0.0 MB');
|
||||
expect(files()).toBe(before);
|
||||
});
|
||||
|
||||
test('a podcast told in seasons is listed one season at a time, or all with each season marked (#482)', async ({ page }) => {
|
||||
await page.locator('#feedlist .feed', { hasText: 'Seasoned Show' }).click({ timeout: 20_000 });
|
||||
await page.locator('#content .tabs button[data-f="all"]').click();
|
||||
const picker = page.locator('#content .seasons');
|
||||
await expect(picker.locator('button')).toHaveText(['All seasons', 'Season 2', 'Season 1', 'Other']);
|
||||
// Every season, newest first: where each starts is said above its first episode.
|
||||
await expect(page.locator('#eps .sdiv')).toHaveText(['Season 2', 'Other episodes', 'Season 1']);
|
||||
await picker.locator('button', { hasText: 'Season 1' }).click();
|
||||
await expect(page.locator('#eps .ep .t')).toHaveText(['The Pilot', 'Season One Close']);
|
||||
await expect(page.locator('#eps .sdiv')).toHaveCount(0);
|
||||
await expect(page.locator('#content .seasons button', { hasText: 'Season 1' })).toHaveAttribute('aria-pressed', 'true');
|
||||
await page.locator('#content .seasons button', { hasText: 'Other' }).click();
|
||||
await expect(page.locator('#eps .ep .t')).toHaveText(['A Bonus Between']);
|
||||
// A podcast with one season has no picker, and opening it starts from every season again.
|
||||
await page.locator('#feedlist .feed', { hasText: 'Test Show' }).first().click();
|
||||
await expect(page.locator('#content .seasons')).toHaveCount(0);
|
||||
await page.locator('#feedlist .feed', { hasText: 'Seasoned Show' }).click();
|
||||
await expect(page.locator('#content .seasons button.on')).toHaveText('All seasons');
|
||||
});
|
||||
|
||||
13
tests/ui/fixtures/seasons.xml
Normal file
13
tests/ui/fixtures/seasons.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
|
||||
<channel><title>Seasoned Show</title><link>http://127.0.0.1:8792/</link><description>A fixture podcast told in seasons (#482).</description>
|
||||
<item><title>Season Two Finale</title><guid>sn-4</guid><pubDate>Mon, 01 Jun 2026 10:00:00 +0000</pubDate>
|
||||
<itunes:season>2</itunes:season><itunes:episode>2</itunes:episode></item>
|
||||
<item><title>Season Two Opener</title><guid>sn-3</guid><pubDate>Mon, 25 May 2026 10:00:00 +0000</pubDate>
|
||||
<itunes:season>2</itunes:season><itunes:episode>1</itunes:episode></item>
|
||||
<item><title>A Bonus Between</title><guid>sn-b</guid><pubDate>Mon, 18 May 2026 10:00:00 +0000</pubDate></item>
|
||||
<item><title>The Pilot</title><guid>sn-1</guid><pubDate>Mon, 11 May 2026 10:00:00 +0000</pubDate>
|
||||
<itunes:season>1</itunes:season><itunes:episode>1</itunes:episode></item>
|
||||
<item><title>Season One Close</title><guid>sn-2</guid><pubDate>Mon, 04 May 2026 10:00:00 +0000</pubDate>
|
||||
<itunes:season>1</itunes:season><itunes:episode>2</itunes:episode></item>
|
||||
</channel></rss>
|
||||
@@ -63,6 +63,11 @@ metrics_bind = "127.0.0.1:8799"
|
||||
url = "http://127.0.0.1:8792/show.xml"
|
||||
auto_download = true
|
||||
|
||||
# Told in seasons, with a bonus naming none between them: the season picker (#482).
|
||||
[feeds.seasoned-show]
|
||||
url = "http://127.0.0.1:8792/seasons.xml"
|
||||
auto_download = false
|
||||
|
||||
# Downloads its image, so the UI has a file that is not playable to deal with.
|
||||
[feeds.picture-blog]
|
||||
url = "http://127.0.0.1:8792/pics.xml"
|
||||
|
||||
Reference in New Issue
Block a user