Commit Graph
952 Commits
Author SHA1 Message Date
imSp4rky 76d82df25b fix(api): keep error URLs readable and mask host paths in dashboard logs 2026-09-08 17:37:32 -06:00
imSp4rky 0b055e43ba fix(api): stop serve leaking server credentials, paths, and cross-tenant data 2026-09-08 16:43:39 -06:00
imSp4rky fc13cda0c4 docs(api): describe the dashboard session payload in the OpenAPI yaml 2026-09-07 17:21:04 -06:00
imSp4rky 84b0a92c41 feat(api): report the live title and the client's command line to the dashboard 2026-09-07 17:03:36 -06:00
imSp4rky b8c78c1a82 fix(api): tell the service that the client sent a cookie jar
A service that picks its auth path in init could only check the server's cookies directory, so a client-sent jar was invisible and the service fell back to the wrong path. The ctx now carries cookies_supplied, and a malformed cookie blob answers 400 instead of 500.
2026-09-07 13:20:55 -06:00
imSp4rky bbd26a2dc3 fix(api): let the server CDM see service-supplied keys and HLS track DRM 2026-09-07 12:30:50 -06:00
imSp4rky b91d7bfa5b fix(api): reach every PlayReady header on all server CDM routes
The rebuild raised KIDNotFound for a header whose KID lives only in the manifest, the single-track route stripped the track's other headers, and the batch cache keyed on the first PSSH alone. Licensing failures now reach the client instead of only the server log.
2026-09-07 11:54:35 -06:00
imSp4rky 8e261ae238 fix(api): license every PlayReady header in the server CDM path
extract_pssh_from_track returns the first PSSH only, so a track carrying one PlayReady object per header licensed fewer keys than the local path, which absorbs its siblings first. Relay batch licensing failures to the client too.
2026-09-07 10:59:33 -06:00
imSp4rky 771fd34bd5 fix(dash): treat a missing FFprobe as no PSSH instead of crashing
PSSH discovery raised OSError when the binary was absent, so a DRM free download failed on any host without FFprobe.
2026-09-07 10:06:10 -06:00
imSp4rky 7065cbf911 fix(drm): license every PlayReady header until all KIDs are covered
Only the first WRM header was read and licensed, so a manifest carrying several headers silently lost content keys. Collect KIDs from every header and license each distinct one until coverage is complete.
2026-09-07 10:05:09 -06:00
imSp4rky 627f1fa81c fix(dl): cache server-CDM keys to the local vaults
Batch and per-track remote licences read the vaults but never wrote back, so a --remote or import run kept nothing. Vault hits now replicate to the other vaults, and the server branch resolves keys under drm_lock like the local path.
2026-09-06 23:10:04 -06:00
imSp4rky d36797641d feat(dl): add --no-postscript to skip post-scripts for one run 2026-09-06 21:02:58 -06:00
imSp4rky 80f2b8f5b4 test(downloader): cover truncation and retry spin guards
Assert that an empty body of unknown length, a 206 with no complete length, and a 206 starting past the resume offset each fail instead of finalizing, and that every restart path spends an attempt.
2026-09-06 20:05:24 -06:00
imSp4rky fe7b3bb651 test(downloader): cover session state carried into download children
Assert that verify, params, cert and auth reach a spawned child, and that a mounted adapter the child cannot reproduce falls back to the single-process path. Documents --download-processes in the CLI reference.
2026-09-06 20:04:25 -06:00
imSp4rky 85503fd87c test(downloader): cover probe judging and the submission window
Assert that a probe is judged on the trailing tick, that a backoff is temporary and climbs back to the cap, and that a worker always finds its next segment staged. Documents adaptive-workers behaviour in the downloading guide.
2026-09-06 20:03:46 -06:00
imSp4rky 22cc739e83 fix(downloader): correct truncation, ranged sizing, and session carry
Check a sequential download against the complete length whenever one is known, and settle the unknown-total case on the 416. An empty body of unknown length, a 206 with no complete length, and a 206 starting past the resume offset all passed the size checks before and were renamed into place. Four restart paths spent no attempt, so a host that always answered the same way cycled forever.
2026-09-06 20:03:08 -06:00
imSp4rky dffb8b27e3 fix(serve): lock shared session state and throttle progress writes
Handlers share one service instance, so a per-session lock keeps two requests out of it at once. Track threads merge and write job state under one lock, and the progress sink coalesces ticks that say the same thing.
2026-09-06 20:01:38 -06:00
sp4rk.y d4ff8f48a3 Merge pull request #156 from CodeName393/Change-minimum-time-for-slow
feat(click): Change the minimum time for slow
2026-09-06 08:44:28 -06:00
CodeName393 620654710d feat(click): Change the minimum time for slow
- Change the minimum time for slow
2026-09-06 22:52:08 +09:00
imSp4rky adea7583f0 test(services): use placeholder tags instead of real service names 2026-09-05 22:16:22 -06:00
imSp4rky 0f9997be4c refactor(drm): drop the hardcoded service branch in the license flow
One service needed session_id in its license call, which a near-duplicate of get_content_keys supplied behind a service-tag test. service_licence now passes each service only the arguments its own license function declares, so the duplicate and the branch are gone. The REST API license paths and the base PlayReady delegate get the same filtering, replacing their fixed argument set.

Two behaviour changes ride along: an empty license challenge now raises EmptyLicense for every service, not just the one, and a service that declares only challenge now receives a working call instead of a TypeError.
2026-09-05 22:14:47 -06:00
imSp4rky e845e9ba28 fix(services): name the build a compiled service is missing
A service shipped as .so/.pyd failed with a bare ModuleNotFoundError. Report the build this interpreter needs, with its version and platform.
2026-09-05 22:13:25 -06:00
imSp4rky 2f28aa8e64 fix(dl): end a cancelled track by raising instead of returning short 2026-09-05 12:52:02 -06:00
imSp4rky b0efa6c8d8 fix(dl): reject local proxies when --remote targets another machine
Gluetun and loopback proxy URIs only listen on this machine. Stop with an error instead of forwarding them, unless the server is on this machine too.
2026-09-05 10:50:35 -06:00
imSp4rky bae71c0194 fix(serve): resolve DRM keys for manifests with no ContentProtection PSSH
Read the init segment server-side so server_cdm licenses every track's real KID, and re-license when the manifest PSSH misses it.
2026-09-04 22:19:21 -06:00
imSp4rky dffb72e41d fix(audio): accept immersive channel layouts like 5.1.4
parse_channels rejected a three-figure layout, so a remote download crashed rebuilding the track from JSON. Add channel_total so --channels can compare either form.
2026-09-04 19:27:39 -06:00
imSp4rky 55bed4876c fix(remote): keep option choices and optional title in remote -h
Rebuild remote service options from the cli_params choices and multiple fields, and mirror the title argument's required flag, so remote help matches local help.
2026-09-04 15:55:31 -06:00
imSp4rky 235839abc8 feat(audio): support DTS:X Profile 2 with MP4 muxing
Route titles with a dtsx/dtsy sample entry to MP4 via MP4Box, since Matroska has no CodecID for DTS-UHD. Add per-rendition HLS audio codec selection, fix merge_segments progress and its cleanup path.
2026-09-04 14:19:29 -06:00
imSp4rky b391ffc80a perf(kv): push keys to vaults concurrently, log one summary per title
Vaults.add_key and add_keys now push to every vault at the same time, so one unreachable vault costs its own timeout instead of the sum. MySQL defaults connect_timeout to vault_timeout.
2026-09-04 09:13:31 -06:00
imSp4rky 1997a92c08 fix(dl): specify 'subtitle tracks' in error log message 2026-09-04 07:58:35 -06:00
imSp4rky 669b944f08 fix(dl): log vault writes under their own title 2026-09-03 22:03:05 -06:00
imSp4rky ce9cdf4dca fix(cli): stop service tags from renaming CLI options 2026-09-03 14:27:17 -06:00
imSp4rky e15c2f067e perf(kv): push whole services to SQL vaults in one call 2026-09-03 13:30:39 -06:00
imSp4rky 993025fba6 fix(dl): fall back to local vaults when the server CDM returns no key 2026-09-03 12:33:41 -06:00
imSp4rky 7affbd9343 fix(kv): keep copy log rows single-spaced 2026-09-03 11:59:30 -06:00
imSp4rky 3eaf4431e2 fix(dl): repair damaged cookie files without rewriting them
Space separators, a BOM, a missing header and #HttpOnly_ rows now load; repairs happen in memory and an unparseable file raises instead of loading as empty.
2026-09-03 10:53:00 -06:00
imSp4rky c9f178f8f0 test(serve): make the session touch test clock-independent 2026-09-03 00:15:17 -06:00
imSp4rky 8354235d56 feat(serve): add operator dashboard endpoints and per-key rate limits 2026-09-02 23:52:55 -06:00
imSp4rky ac8f71b969 fix(remote): send per-track MPD fragments for service-built AdaptationSets
A service can build an AdaptationSet the served manifest does not contain, so the client's re-parse could never find it and the track downloaded with no manifest data. Those tracks now get a one-AdaptationSet MPD of their own.
2026-09-02 15:13:06 -06:00
sp4rk.y 80167630af Merge pull request #154 from CodeName393/Update-Core
Confirmed working locally, merging.
2026-09-02 12:08:36 -06:00
CodeName393 83ebe81386 refactor(monalisa): remove ML-Worker and improve MonaLisa DRM
- Remove ML-Worker binary and legacy decryption logic from core
- Add tool_path injection and CLI subprocess runner in MonaLisa
- Make MonaLisa format-agnostic (support both segment & single track)
2026-09-02 22:26:47 +09:00
CodeName393 13fc47546f feat(binary): add custom binary registration for services
- Allow services to declare required binaries via `@staticmethod def get_binaries()`
- Support accessing registered custom binaries directly via `binaries.<Name>`
- Automatically search service local `binaries/` directories
2026-09-02 21:34:48 +09:00
imSp4rky f8f58f86ef fix(remote): match re-parsed manifest tracks by ID before attributes
Match once after every server manifest is parsed, and require range and bitrate in the video fallback, so a per-range ISM ladder no longer hands an HDR10 track the SDR quality level. Pass -xerror to the bsf ffmpeg calls so a failed rewrite keeps the original file instead of a near-empty one.
2026-09-01 15:06:29 -06:00
imSp4rky e00f6cca86 fix(dash): number SegmentTimeline segments from startNumber
Timeline manifests with startNumber between 2 and the segment count capped the range at the count, truncating live replays.
2026-09-01 14:05:06 -06:00
imSp4rky 7310273594 fix(ism): signal Dolby Vision and Atmos from Smooth manifests
Init segments now carry dvcC/dvvC with a profile-keyed sample entry and the dby1 brand; track ids cover the manifest URL so per-range ladders stop colliding, and the remote path carries the Atmos flag without inventing a JOC count.
2026-09-01 12:50:59 -06:00
imSp4rky a6d0b97ed7 fix(remote): pass fallback language to ISM re-parse 2026-09-01 08:57:54 -06:00
imSp4rky 6ccbc18aa5 fix(cdm): scope remote CDM licence state to its session
Required KIDs and pssh_b64 were shared across concurrently licensed tracks. Also handle forced cached-key responses, L2 certificates, and stop truncating cookie files on save.
2026-08-31 23:07:34 -06:00
imSp4rky 5670f610aa feat(remote): spoof a type-only CDM so server_cdm clients need no local .wvd/.prd
Stand in a SimpleNamespace CDM matching the server's DRM system when server_cdm is active and no local device is loaded, guarded on the resolved _server_cdm. Centralizes cdm_type_stub in cdm.detect, reused by the REST handlers.
2026-08-31 22:15:47 -06:00
imSp4rky 006a7c2ef0 fix(remote): raise GET timeout to 120s so large catalogs load 2026-08-31 15:25:41 -06:00
imSp4rky dae2b37ad6 fix(serve): license multi-key PlayReady through server CDM instead of vault subset
A PlayReady WRMHEADER can advertise fewer KIDs than its multi-key license returns, so a server-vault hit on the PSSH KID alone handed every track the same key subset and failed sibling tracks. Drop the pre-license vault shortcut for PlayReady and reuse the licensed bundle per PSSH.
2026-08-31 14:38:00 -06:00