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:
@@ -14,10 +14,13 @@ const lists=new Map<string,ListPage>();
|
||||
const LISTS_KEPT=40;
|
||||
/// Lists on their way, so a click on one already being fetched ahead waits for that answer.
|
||||
const fetching=new Map<string,Promise<ListPage>>();
|
||||
const listKey=(feed: string, filter=S.filter)=>[feed,filter,S.sort.col,S.sort.dir,S.q].join('\n');
|
||||
// A season is of the podcast open (#482): another feed's list, fetched ahead, is of every season.
|
||||
const seasonFor=(feed: string)=>feed===S.feed?S.season:'';
|
||||
const listKey=(feed: string, filter=S.filter)=>[feed,filter,S.sort.col,S.sort.dir,S.q,seasonFor(feed)].join('\n');
|
||||
function listUrl(feed: string, filter=S.filter, offset=0){
|
||||
const p=new URLSearchParams({offset:String(offset),limit:String(LIMIT),filter,sort:S.sort.col,dir:S.sort.dir});
|
||||
if(S.q) p.set('q',S.q);
|
||||
if(seasonFor(feed)) p.set('season',seasonFor(feed));
|
||||
const sg=signalId(feed);
|
||||
return feed===':all' ? `/api/entries?${p}`
|
||||
: sg!==null ? `/api/signals/${sg}/entries?${p}`
|
||||
@@ -155,7 +158,14 @@ function renderEntries(){
|
||||
else if(sg&&S.filter==='all') box.innerHTML='<p class="empty">Nothing has come through yet. New items are read as your feeds are checked.</p>';
|
||||
return;
|
||||
}
|
||||
for(const e of S.entries) box.appendChild(epEl(e));
|
||||
const breaks=seasonBreaks();
|
||||
let last: number|null|undefined;
|
||||
S.entries.forEach((e,i)=>{
|
||||
if(breaks&&(i===0||(e.season??null)!==(last??null)))
|
||||
box.insertAdjacentHTML('beforeend',`<div class="sdiv" role="heading" aria-level="3">${seasonName(e.season)}</div>`);
|
||||
last=e.season;
|
||||
box.appendChild(epEl(e));
|
||||
});
|
||||
syncPlayButtons();
|
||||
if(pane) pane.scrollTop=top;
|
||||
if(hasMore()){
|
||||
|
||||
Reference in New Issue
Block a user