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:
@@ -37,6 +37,19 @@ test('names sort as a shelf files them, a leading The, A or An aside (#481)', ()
|
||||
'The Rest Is Science', 'science weekly', 'Theory of Everything']);
|
||||
});
|
||||
|
||||
test('a podcast gets its seasons only when most of it is in two or more (#482)', () => {
|
||||
const shown = (list: object) => run(`seasonsShown(${JSON.stringify(list)})`);
|
||||
const s = (season: number | null, episodes: number) => ({ season, episodes, unread: 0 });
|
||||
assert.equal(shown([s(6, 25), s(5, 40), s(1, 30)]), true, 'Oxide and Friends');
|
||||
assert.equal(shown([s(7, 40), s(1, 30), s(null, 3)]), true, 'a few trailers aside');
|
||||
assert.equal(shown([s(232, 1), s(225, 1), s(null, 364)]), false, 'two numbered of 366');
|
||||
assert.equal(shown([s(2023, 150), s(12026, 44), s(null, 573)]), false, 'years on a quarter of them');
|
||||
assert.equal(shown([s(1, 40)]), false, 'one season is no choice');
|
||||
assert.equal(shown([{ episodes: 3, unread: 0 }, s(2, 2), s(1, 2)]), true, 'none sent as absent, as protobuf does');
|
||||
assert.equal(run('seasonName(null)'), 'Other episodes');
|
||||
assert.equal(run('seasonName(3)'), 'Season 3');
|
||||
});
|
||||
|
||||
test('webUrl keeps only web addresses from a feed', () => {
|
||||
assert.equal(run(`webUrl('https://example.com/a')`), 'https://example.com/a');
|
||||
assert.equal(run(`webUrl('HTTP://example.com/')`), 'HTTP://example.com/');
|
||||
|
||||
Reference in New Issue
Block a user