From ee3b563ecec4a6e9e7755d3ed6bc08faa3916545 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Tue, 26 May 2026 18:22:12 -0700 Subject: podcast: wire reel mouth rss via itunes lookup api - add fetchReelMouthFeed() to aero.js using itunes api (id 1709836497) - replace hardcoded episodes with dynamic #pod-episodes container - swap in real artwork on load, fallback placeholder until then - fix links: apple podcasts, anchor.fm rss feed - lazy-loads on first window open, cached after that Co-Authored-By: Claude Sonnet 4.6 --- aero.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'aero.js') diff --git a/aero.js b/aero.js index e97e376..01a9b83 100644 --- a/aero.js +++ b/aero.js @@ -176,4 +176,27 @@ async function fetchVisitorCount() { return j.count; } -window.Aero = { spawnBubbles, makeClouds, sparkleCursor, makeDraggable, counterHTML, nowPlayingHTML, animateEq, musicToggleHTML, bindMusicToggle, fetchLastFm, fetchFilms, fetchVisitorCount }; +async function fetchReelMouthFeed(limit = 6) { + const url = `https://itunes.apple.com/lookup?id=1709836497&entity=podcastEpisode&limit=${limit + 1}`; + const r = await fetch(url); + if (!r.ok) throw new Error('itunes ' + r.status); + const j = await r.json(); + const podcast = j.results.find(x => x.kind === 'podcast'); + const episodes = j.results.filter(x => x.kind === 'podcast-episode').slice(0, limit); + return { + art: podcast ? podcast.artworkUrl600 : null, + episodes: episodes.map(e => { + const ms = e.trackTimeMillis || 0; + const mins = Math.floor(ms / 60000); + const h = Math.floor(mins / 60); + const m = mins % 60; + return { + title: e.trackName, + url: e.trackViewUrl, + duration: h ? `${h}:${m.toString().padStart(2, '0')}` : `${m}m`, + }; + }), + }; +} + +window.Aero = { spawnBubbles, makeClouds, sparkleCursor, makeDraggable, counterHTML, nowPlayingHTML, animateEq, musicToggleHTML, bindMusicToggle, fetchLastFm, fetchFilms, fetchVisitorCount, fetchReelMouthFeed }; -- cgit v1.3-2-g0d8e