Name an item without a title from its own text, not "(untitled)" (#116)
RSS 2.0 makes an item's title optional, and some blogs leave it out on purpose: Scripting News titles almost none of its posts. Fifty rows of "(untitled)" said nothing about any of them. entryName gives an item its title, or the opening of its text (HTML read through DOMParser, an inert document that loads nothing; cut at a word near 120 characters), or its file's name, or its show and date, with a flag for a name that is not a title. The list sets that one in the regular weight, as the text it is rather than a heading; the reader leaves out the heading so the post starts with itself; the player, the lock screen, Currently Listening, the native shell, Share and the queued toast use the same name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ function play(e,enc=e.enclosures.find(isPlayable)){
|
||||
if(e.position>5) audio.addEventListener('loadedmetadata',()=>{audio.currentTime=e.position},{once:true});
|
||||
// Initials, if it comes to that, are the feed's: the episode's read as "SE" beside the feed's art.
|
||||
$('#partwrap').innerHTML=artHTML(e.image||feedArt(e.feed_id),feedName(e.feed_id));
|
||||
$('#ptitle').textContent=e.title||'(untitled)';
|
||||
$('#ptitle').textContent=entryName(e).text;
|
||||
const f=S.feeds.find(x=>x.id===e.feed_id);
|
||||
$('#pfeed').textContent=f?(f.title||f.id):'';
|
||||
$('#player').classList.add('on');
|
||||
@@ -45,7 +45,7 @@ function play(e,enc=e.enclosures.find(isPlayable)){
|
||||
function mediaSession(e,f){
|
||||
if(!('mediaSession' in navigator)) return;
|
||||
navigator.mediaSession.metadata=new MediaMetadata({
|
||||
title:e.title||'', artist:f?(f.title||f.id):'', album:f?(f.title||''):'',
|
||||
title:entryName(e).text, artist:f?(f.title||f.id):'', album:f?(f.title||''):'',
|
||||
artwork:(e.image||(f&&f.image))?[{src:artSrc(e.image||f.image),sizes:'512x512'}]:[],
|
||||
});
|
||||
const h={play:()=>audio.play(),pause:()=>audio.pause(),
|
||||
|
||||
Reference in New Issue
Block a user