Repository navigation
Refuse live and upcoming stream links before downloading - #296
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
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.
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
projects/peek.ts):announcedDurationnow also readsis_live/live_statusfrom the yt-dlp info it already fetches. It throwsLiveSourceError(one shared message) for a live or upcoming stream, and the answer is cached like the length.pipeline/ingest.ts):NonRetryableErrorbefore downloading.--match-filter "!is_live & live_status!=is_upcoming", for when the lookup failed (for example, on a proxy error).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_sourcereturnsfits: falsewith the message and no quota.was_live, with a duration) downloads as before.docs/n8n/README.md, adocs/TROUBLESHOOTING.mdentry, and a changeset.Checked
is_live: trueandduration: 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).For the reviewer