fix(clip): a clip is held to its owner's storage cap, and its limits and failures say the server's truth
- The cut file is measured against what its owner has left, for a YouTube range (whose fetch never reads yt-dlp's size ceiling) and for a Plex clip (which fetches nothing), before the fetch and again before it is placed; a refusal leaves the asset pending for a Retry. - A silent Plex file is cut silent; a file the probe cannot read says so. - A second job on a failed or renamed clip gets the same YouTube diagnosis and the fetched title. - The "too long" refusal names the server's cap; a contract test holds the client's copies of the clip limits to clip.py; the shipped player clients are pinned against the installed yt-dlp. - One HDR transfer set and one rating_key lookup; job status words from JobStatus; the display-name guard sees subscript writes and the clip route; stale comments and types follow the clip job.
This commit is contained in:
@@ -175,6 +175,21 @@ def test_the_cookie_capable_clients_match_the_installed_ytdlp():
|
||||
assert set(YouTubeAdapter._AUTHED_DEFAULT) <= live
|
||||
|
||||
|
||||
def test_the_shipped_player_clients_exist_in_the_installed_ytdlp():
|
||||
# yt-dlp skips a client it does not know with a warning and falls back to its own defaults, so
|
||||
# a bump that renames or drops one (tv_simply, the one measured to deliver HD) would change
|
||||
# what every download is fetched with, silently. Read from the Settings defaults, not from
|
||||
# `settings`, which an environment may override.
|
||||
from yt_dlp.extractor.youtube._base import INNERTUBE_CLIENTS
|
||||
|
||||
from app.config import Settings
|
||||
|
||||
fields = Settings.model_fields
|
||||
for knob in ("download_player_clients", "download_player_clients_fallback"):
|
||||
names = Settings._clients(fields[knob].default)
|
||||
assert names and set(names) <= set(INNERTUBE_CLIENTS), (knob, names)
|
||||
|
||||
|
||||
def test_youtube_ydl_opts_extra_carries_player_client_and_pot():
|
||||
ea = YouTubeAdapter().ydl_opts_extra(["android_vr"])["extractor_args"]
|
||||
assert ea["youtube"]["player_client"] == ["android_vr"]
|
||||
|
||||
Reference in New Issue
Block a user