From 939e7b9da424b2d309f4c79fe2a735aa9ecd1d88 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Wed, 22 Jul 2026 14:37:25 -0400 Subject: [PATCH] Restore Spotify iframe on individual episode detail pages; v1.1.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-episode player (chosen in /admin) reverts to the Spotify embed iframe — only the /episodes listing page uses the new custom player. Co-Authored-By: Claude Sonnet 4.6 --- package.json | 2 +- src/App.tsx | 35 +++++++++++++++-------------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 27a81cd..5f36619 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "siteforge", "private": true, - "version": "1.1.6", + "version": "1.1.7", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.tsx b/src/App.tsx index 105ce29..82aa58b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1282,21 +1282,6 @@ function EpisodeDetailPage({ content }: { content: SiteContent }) { const { id } = useParams<{ id: string }>() const episode = (content.podcastFeaturedLinks ?? []).find(e => e.id === id) const [resolvedEmbedUrl, setResolvedEmbedUrl] = useState('') - const [audioUrl, setAudioUrl] = useState('') - - // Fetch the direct MP3 URL from the RSS-backed episodes list, matching by title - useEffect(() => { - if (!episode) return - fetch('/api/episodes') - .then(r => r.ok ? r.json() : Promise.reject()) - .then((data: { episodes?: { title: string; audioUrl: string }[] }) => { - const match = (data.episodes ?? []).find(e => - e.title?.trim().toLowerCase() === episode.title?.trim().toLowerCase() - ) - if (match?.audioUrl) setAudioUrl(match.audioUrl) - }) - .catch(() => {}) - }, [episode]) useEffect(() => { let cancelled = false @@ -1398,12 +1383,22 @@ function EpisodeDetailPage({ content }: { content: SiteContent }) {

{episode.title}

{episode.summary &&

{episode.summary}

} - {(episode.embedUrl || episode.url || audioUrl) && ( + {(episode.embedUrl || episode.url) && (
- {audioUrl ? ( - - ) : resolvedEmbedUrl ? ( - + {resolvedEmbedUrl ? ( + resolvedEmbedUrl.includes('spotify.com') ? ( +