Share says why an episode gets no play link (#454)
A private feed's episode, or one ipx-play could not make a link for, was offered its own address with no word of why, so someone expecting a page anyone can play could not tell it was on purpose. The menu now says the feed is private to them, or that the link could not be made just now, beside the warning for an address carrying their access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -522,6 +522,17 @@ function encBox(x: Enclosure){
|
||||
/// seconds in is the start.
|
||||
const shareAt=(url: string, secs: number)=>secs>=5 ? `${url}?t=${Math.floor(secs)}` : url;
|
||||
|
||||
/// Why Share offers the item's own address rather than a page anyone can play (#454), and the
|
||||
/// warning when that address carries your own access to the feed. No reason for a server with no
|
||||
/// ipx-play, where the item's own address is all Share has ever given.
|
||||
function noLinkNote(why: string|null, url: string): string{
|
||||
const notes: string[]=[];
|
||||
if(why==='private') notes.push('This podcast\'s feed is private to you, so it gets no page anyone can play: Share gives the episode\'s own address instead.');
|
||||
else if(why==='failed') notes.push('The page anyone can play could not be made just now, so this is the episode\'s own address. Try again later for a link to it.');
|
||||
if(carriesAccess(url)) notes.push(ACCESS_WARNING);
|
||||
return notes.map(n=>`<p class="hint">${esc(n)}</p>`).join('');
|
||||
}
|
||||
|
||||
/// An episode shared as Overcast shares one (#447): a link to its page on ipx-play, where anyone
|
||||
/// can play it, from where you are in it if you like. A private feed, a post, or a server with no
|
||||
/// ipx-play shares the item's own address, through the same menu.
|
||||
@@ -543,7 +554,7 @@ async function shareEpisode(e: Entry, encId: number|null){
|
||||
// warning is written here, not asked with confirm(), which the iOS app answers Cancel (#453).
|
||||
openModal(`<button class="iconbtn cardx" onclick="closeModal()" title="Close" aria-label="Close">${ICON.close}</button>
|
||||
<h3>Share</h3><p class="hint">${esc(name)}</p>
|
||||
${!link.url && carriesAccess(url) ? `<p class="hint">${esc(ACCESS_WARNING)}</p>` : ''}
|
||||
${link.url ? '' : noLinkNote(link.why, url)}
|
||||
<div class="sharemenu">
|
||||
<button class="btn primary" id="shlink">${ICON.share} Share link</button>
|
||||
${at>=5?`<button class="btn" id="shat">${ICON.share} Share from ${clock(at)}</button>`:''}
|
||||
|
||||
Reference in New Issue
Block a user