fix: resolve episode audio from the podcast feed - #8
Open
ofa1 wants to merge 1 commit into
Open
Conversation
The cron has thrown on every run for ~24h (114 consecutive exceptions, none before that). The latest episode was published as a .wav, so PowerPress rendered a link-only player instead of an HTML5 one, and the `audio source` selector in getAudioUrl matched nothing. Reading the media URL out of theme output meant any rendering change could break the pipeline. The podcast feed carries the same URL in its <enclosure> tag, which is a stable contract, so getEnclosure replaces getHTML/getAudioUrl and src/audio.ts goes away along with the cheerio dependency. The feed also declares the file size, which fixes a second latent bug: sendTelegramAudio buffered the whole file via arrayBuffer(), so the current 104 MB episode would exhaust the 128 MB isolate long before the 50 MB guard fired. Files at or under 20 MB are now handed to Telegram as a URL and never pass through the worker; larger ones still buffer. The Blob content type is derived from the file extension rather than being hardcoded to audio/mpeg. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pdQQY5i3n8hCfmmRV93Gy
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
mhmic-telegram-cron | 98509d1 | Sep 06 2026, 02:51 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cron has thrown on every run for ~24h (114 consecutive exceptions,
none before that). The latest episode was published as a .wav, so
PowerPress rendered a link-only player instead of an HTML5 one, and the
audio sourceselector in getAudioUrl matched nothing.Reading the media URL out of theme output meant any rendering change
could break the pipeline. The podcast feed carries the same URL in its
tag, which is a stable contract, so getEnclosure replaces
getHTML/getAudioUrl and src/audio.ts goes away along with the cheerio
dependency.
The feed also declares the file size, which fixes a second latent bug:
sendTelegramAudio buffered the whole file via arrayBuffer(), so the
current 104 MB episode would exhaust the 128 MB isolate long before the
50 MB guard fired. Files at or under 20 MB are now handed to Telegram as
a URL and never pass through the worker; larger ones still buffer. The
Blob content type is derived from the file extension rather than being
hardcoded to audio/mpeg.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_014pdQQY5i3n8hCfmmRV93Gy