Skip to content

Refuse live and upcoming stream links before downloading - #296

Merged
dillonstreator merged 1 commit into
mainfrom
claude/worker-stuck-ingest-26a74c
Nov 18, 2026
Merged

dillonstreator merged 1 commit into
mainfrom
claude/worker-stuck-ingest-26a74c

Conversation

@dillonstreator

Copy link
Copy Markdown
Member

Why

A link to a stream that is still live has no length, so the minutes check before the download was skipped. yt-dlp then recorded the stream through the download proxy until the stream ended. The project sat in ingest with no progress, and proxy traffic kept being used for as long as the stream ran.

Repro: create a project from any youtube.com/live/<id> link that is currently live. Before this change, ingest never finishes and the worker card shows it in ingest. With this change, the project fails at once with a message saying to add the link again once the recording is up.

What changed

  • Link lookup (projects/peek.ts): announcedDuration now also reads is_live / live_status from the yt-dlp info it already fetches. It throws LiveSourceError (one shared message) for a live or upcoming stream, and the answer is cached like the length.
  • Ingest (pipeline/ingest.ts):
    • A live link fails as NonRetryableError before downloading.
    • The download also runs with --match-filter "!is_live & live_status!=is_upcoming", for when the lookup failed (for example, on a proxy error).
    • A filtered link exits 0 with no info line and no file. That case is now read as the same refusal instead of the retryable "no source file was produced".
  • check_source / createProject (projects/service.ts): accounts with a minutes limit already look the link up, so they now get the refusal before the project is created. check_source returns fits: false with the message and no quota.
  • Unaffected: the recording of a stream that has ended (was_live, with a duration) downloads as before.
  • Copy: the n8n FAQ on the website, docs/n8n/README.md, a docs/TROUBLESHOOTING.md entry, and a changeset.

Checked

  • Ran yt-dlp 2026.10.21 against a real live stream: the lookup JSON has is_live: true and duration: null. With the match filter, yt-dlp exits 0 and prints nothing, and nothing is downloaded.
  • test/peek.test.ts: new cases for a live stream (refused and cached), an upcoming stream (refused), and an ended stream's recording (accepted).
  • Server typecheck passes, and the related server tests pass (137/137).

For the reviewer

  • Accounts without a minutes limit don't look the link up at create time (unchanged), so they get the refusal when ingest starts, still before any download.
  • Not in this PR: refusing before download when an account has no minutes left (the length is unknown until after the download today), and a wall-clock limit on downloads.

A live stream link announces no length, so the minutes check before the
download was skipped and yt-dlp recorded the stream through the download
proxy until it ended, with the project stuck in ingest and no progress.

The link lookup now reads is_live/live_status and throws LiveSourceError
for a live or scheduled stream; ingest fails it at once without a retry,
and the download itself runs with --match-filter for when the lookup
failed. check_source and project creation refuse it up front on accounts
that already look the link up (minutes limits).

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reelsaw-website Ready Ready Preview Nov 18, 2026 5:27pm UTC

Request Review

@dillonstreator
dillonstreator merged commit 4625d28 into main Nov 18, 2026
15 checks passed
@dillonstreator dillonstreator mentioned this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant