Commit Graph
226 Commits
Author SHA1 Message Date
imSp4rky 6ca2503a5f perf: lazy-load services and proxy catalogues, faster namespace strip
load_xml strips namespaces without QName; services import on first use and proxy providers fetch their catalogue on first query; the font scan is skipped when no subtitle names a font and is cached per process.

Serve CPU -40% and track requests -28% on 20 MB manifests; CLI startup 2.7 s -> 1.2 s; --list 27-46% faster across six services tested.
2026-11-04 11:12:11 -07:00
imSp4rky 893c81f428 fix(drm): key PIFF-first tracks by track ID and trust shaka's exit code
mp4decrypt copied a track whose first sinf has no tenc through encrypted; pass its key by track ID and retry with shaka on a passthrough. Shaka fails only on a non-zero exit now.
2026-11-03 17:05:26 -07:00
imSp4rky 5ffdda3883 fix(binaries): report a version for git ffmpeg builds
Dated builds (N-<rev>-g<hash>-YYYYMMDD, YYYY-MM-DD-git-<hash>, shallow-clone git-YYYY-MM-DD-<hash>) report YYYYMMDD; undated ones N-<rev>.
2026-11-03 14:13:28 -07:00
imSp4rky b710b5b0c9 feat(titles): add a sports output and folder template kind
A sport episode uses output_template.sports with a {date} in the template's separator style; the flag survives --remote, the REST API and export.
2026-11-03 08:43:05 -07:00
imSp4rky 3027592e31 fix: drop null vault keys, cap snapshot restore size, isolate test globals
Vaults.add_keys and kv add skip null content keys instead of failing the batch; is_null_key moves to core.vault. A manifest snapshot restore has one 32 MiB inflate budget. Tests reset the speed limiter and config between runs.
2026-11-02 22:01:02 -07:00
imSp4rky c4677341c8 refactor(drm): resolve content keys in one licence path behind ServerKeySource
Drop null keys from every licence, server and export source, not only Widevine. dl now finds remote sessions and imports through ServerKeySource instead of private fields.
2026-11-02 21:13:23 -07:00
imSp4rky d8a4950b99 fix(import): keep only exported dash content periods on a re-fetch
The export writes mediaexport content_periods per manifest; an import that re-fetches the MPD (no saved snapshot) drops the periods a service filtered.
2026-11-02 20:58:49 -07:00
imSp4rky 842ece3802 fix(manifests): skip filtered dash periods after the main content and keep them over export
A manifest snapshot module now saves and restores DASH/ISM parser state for --remote and export/import, so an import keeps the service's period filter without fetching the manifest.
2026-11-02 20:41:27 -07:00
imSp4rky eeff83b820 fix(api): cast download job options with the dl click types
cast_dl_params feeds ctx.params to dl() and dl.result() as on the CLI. A string lang value now returns 400 instead of splitting into letters, and -r accepts HDR10+.
2026-11-02 20:30:40 -07:00
imSp4rky dc188b7276 fix(manifests): match dash representations across periods by shape, not id
Some packagers renumber AdaptationSet and Representation ids in every Period, so audio took video segments after the first Period. A match never crosses codec, size or language.
2026-11-02 17:50:35 -07:00
imSp4rky c744e9a87b perf(proxies): cache expressvpn and proton catalogues across requests
A config reload clears the cache; a failed answer is never kept.
2026-11-02 17:11:58 -07:00
imSp4rky bb081046e2 perf(api): stop rebuilding proxy catalogues, vaults and cdms per request
Cache proxy provider catalogues (10 min), reuse vaults and CDMs across one batch licence call, and cache the health update check, /api/services entries and parsed service config.yaml.
2026-11-02 14:40:58 -07:00
imSp4rky e01204ac13 fix(binaries): kill the whole process tree when a version probe times out
dl's debug log takes tool versions from binary_version.
2026-11-02 13:49:18 -07:00
imSp4rky dd3862be8a feat(env): show tool versions in env check, paths with --verbose
binary_version moves to core/binaries and reads the version from the tool's own banner line; only mp4decrypt is run with no arguments.
2026-11-02 13:37:50 -07:00
imSp4rky 1a7192380d fix(drm): keep the monalisa ciphertext when the decrypt tool fails
The tool writes to a temporary file through run_step, which gains a timeout that hides the command line. A missing tool now raises instead of skipping.
2026-11-01 21:26:36 -07:00
imSp4rky 93ca8ab9c0 fix(dl): read the drm's content keys again after a relicence replaces them
A licence that builds a new key dict left decrypt_verified on the old one, so a falsely flagged key stayed flagged and a replacement key went unchecked. Both relicence passes now share one step that clears the flag.
2026-11-01 20:41:38 -07:00
imSp4rky a58da3f5d3 fix(music): stop reading a kb/s bitrate as a hi-res sample rate
A lossy label such as "256 kb/s AAC" or "MP3 320 kb/s" no longer gets the per-track Hi-Res badge.
2026-11-01 18:14:03 -07:00
imSp4rky 96c3840b82 fix(session): keep cookie paths so same-name cookies stay on their own path
RnetCookieAdapter stores cookies by domain, path and name and sends path, secure and a leading-dot domain to rnet. It also takes server-rotated values, and worker children and track sessions get the cookies with their paths.
2026-10-31 22:57:22 -06:00
imSp4rky 86f26c31d5 refactor(tracks): name and match resolutions by one standard-height rule
standard_resolution() replaces the aspect-ratio logic in naming and is shared by -q matching, export names and progress/hybrid labels, so 1920x1088, 1916x1076, portrait and DCI sizes get standard names.
2026-10-31 22:05:26 -06:00
imSp4rky d5a8ed2a39 fix(titles): name a dv profile 7 or 8 track with an unnamed pq base DV.HDR 2026-10-31 21:52:03 -06:00
imSp4rky 15e46d8bcc fix(titles): name a PQ video track without HDR10 metadata HDR 2026-10-31 21:42:11 -06:00
imSp4rky c6c0331007 refactor(dl): share the cache, vault and key-label steps in prepare_drm
take_cached_key, take_vault_key and add_key_label replace the code copied across the server-CDM, Widevine, PlayReady, ClearKey and MonaLisa branches.
2026-10-31 13:28:29 -06:00
imSp4rky b3c86413d5 fix(dl): take turns on licence requests so one licence serves every track
Tracks with different KID sets still query the vaults at the same time, but wait for one licence lock and check the key cache again before they licence.
2026-10-31 12:42:43 -06:00
imSp4rky 97711e799c fix(manifests): decode audio channels by scheme in dash, hls and ism
DASH reads the AudioChannelConfiguration scheme (Dolby mask, CICP index incl. immersive layouts, channel count); HLS and ISM counts map 6/7/8 to 5.1/6.1/7.1.
2026-10-30 23:22:47 -06:00
imSp4rky 7898ff6dd6 refactor(types): bring mypy to zero errors across unshackle
Fix the bugs the type errors exposed (RnetSession.send body, HLS proxy session, title cache fallback, mux progress) and gate mypy in pre-commit, warn-only in CI.
2026-10-30 20:51:21 -06:00
imSp4rky b493c9cd52 fix(naming): tag HDR10+ from the track range when MediaInfo misses it 2026-10-30 17:28:50 -06:00
imSp4rky 17d4905577 fix(titles): compare dub languages under their macrolanguage
A cmn track on a zh title no longer gets DUBBED, and nb and nn count as no; yue stays separate.
2026-10-29 21:23:45 -06:00
imSp4rky d4abcb51d9 feat(naming): add audio_contain_all language tag condition
An empty audio_contain_all or subs_contain_all list now never matches; before this, an empty subs_contain_all list matched every release.
2026-10-29 14:41:06 -06:00
imSp4rky bd64f3a8c4 fix(api): stop a service's sys.exit from killing the serve process
Catch SystemExit at service import, in the heartbeat task, the 5xx middleware, search, samples and chapters, and answer it as SERVICE_ERROR.
2026-10-29 11:23:53 -06:00
imSp4rky b0c006d7f6 feat(naming): add codec_names to rename codec and HDR labels in filenames
A codec name that ends in a digit now gets a separator before the channels, so AC-4 2.0 gives AC-4.2.0 and no longer AC-42.0.
2026-10-28 14:19:23 -06:00
imSp4rky 9017ab95b7 feat(tracks): add Video.hdr10_base and forward s_lang over remote and REST
A DV track with an HDR10 base (profile 8.1) lists as DV+HDR10; dl_params now carry s_lang.
2026-10-27 13:06:48 -06:00
imSp4rky 0440f2ba54 fix(manifests): keep service drm, rebase carried vtt cues, ship single-track mpds
DASH no longer drops service-set DRM when the manifest has none, and the WebVTT rebase allows a cue that starts one segment early. --remote also sends single-track manifests matched by track id.
2026-10-27 11:38:47 -06:00
imSp4rky 84fd0a4bee feat(tracks): add Tracks.dedupe and match variant tracks by signature
get_tracks_for_variants skips a later manifest's track when a held track has the same signature, so a track whose ID changes per manifest is listed once.
2026-10-27 10:44:12 -06:00
imSp4rky 06f87dafa3 feat(drm): add blowfish stripe cipher and mp3 audio codec
BlowfishStripe decrypts on the client after download, so a --remote client gets clear audio.
2026-10-26 18:59:42 -06:00
imSp4rky ffeb58f808 feat(manifests): add dts-hd, mpeg-h and lcevc codecs and a manifest corpus
Fix DASH SegmentTimeline negative @r and Pattern, TTML sidecar sets with no contentType, HLS CHANNELS identifiers and Dolby channel masks; test against 408 public DASH/HLS/ISM manifests.
2026-10-26 10:30:43 -06:00
imSp4rky af2ec8112c fix(dash): end segmentbase media range at the last byte of the file
The range ran one byte past the end, so a collapsed SegmentBase download gained a trailing zero byte. An unknown "*" total now sends an open-ended range.
2026-10-25 15:07:55 -06:00
imSp4rky 8151946ec0 fix(mp4): serialize pymp4 parses of bit-field boxes across threads 2026-10-25 13:43:39 -06:00
imSp4rky 0c58575a5b perf(dash): collapse single-file tracks that have a sidx gap 2026-10-25 13:23:53 -06:00
imSp4rky d0f9307506 perf(proxy): test the remote CDM hosts only after the walk finds service code 2026-10-24 17:57:48 -06:00
imSp4rky fdb5369534 fix(proxy): match a reloaded service class by name and dedup warnings per run
A hot service reload made instance_of miss the new class, so a run with no proxy got a false bypass warning.
2026-10-24 17:29:02 -06:00
imSp4rky 34e8e37fdc fix(services): clear service-repo bytecode with git pathspecs before a pull
Delete untracked __pycache__ before each pull and drop the global dont_write_bytecode, so service bytecode is cached again
2026-10-24 15:57:08 -06:00
imSp4rky 866420ed67 fix(dash): treat a caption subtitle also marked SDH as SDH 2026-10-24 13:43:52 -06:00
imSp4rky 0de069f35a fix(console): count a virama conjunct as one cell
A Hindi conjunct such as न्द in हिन्दी drew the --list border one cell short.
2026-10-24 12:46:53 -06:00
imSp4rky 1175035317 feat(tracks): name unnamed tracks by language and tag subtitle scripts
Unnamed tracks get the English language name (default region left out); subtitle tags gain the script their region implies (zh-TW -> zh-Hant-TW). Refs #169
2026-10-24 10:59:21 -06:00
imSp4rky 83514d12fe fix(core): cut user-facing errors and warnings to one line 2026-10-23 20:23:05 -06:00
imSp4rky dfc99783b5 fix(downloader): report spent segment retries in one line without the URL
The session message names the host, not the signed URL, and a segment that fails every attempt prints one line with no traceback. API job errors come from the exception.
2026-10-23 19:47:12 -06:00
imSp4rky 9f054269db fix(vaults): copy no vault key from a clear track
kid_windows returns an empty map for an MP4 with no encrypted sample entry or protecting senc, so the key check judges, flags and copies nothing for it.
2026-10-23 16:59:40 -06:00
imSp4rky 3345422790 fix(drm): load a bare PlayReady WRMHEADER from DASH, HLS and ISM manifests
PlayReady.from_pssh_b64 wraps a bare UTF-16LE WRMHEADER in a PlayReady Object and keeps that as pssh_b64. DASH and ISM log and skip a PlayReady entry they cannot parse.
2026-10-23 15:55:01 -06:00
imSp4rky cc4bf19706 fix(vaults): stop false bad-key flags from a failed decode check
Judge a vault KID only on a file whose KID map holds it, tell remote vaults of a bad pair only once another key replaces it, and let the server CDM unflag a pair it returns; the server never flags a CDM-licensed pair. Log FFmpeg stderr on a failed check and name the missing CDM when none is set.
2026-10-23 15:31:26 -06:00
imSp4rky af69e8aad4 feat(proxy): try bare --proxy providers in proxy_providers key order
Basic stays first and Control D last; the rest follow their config key order. Geofence and proxy_map lookups go through pick_proxy and skip a provider that fails.
2026-10-23 08:20:39 -06:00