Commit Graph
938 Commits
Author SHA1 Message Date
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
imSp4rky 9dec33660b fix(cli): show banner when dl -q is used
Scope the banner suppression to serve's --quiet/-q flag; the global argv check also matched dl's -q quality option and skipped the update check.
2026-08-31 12:32:20 -06:00
imSp4rky 9cba84da4c fix(util): remove : 2026-08-31 11:58:55 -06:00
imSp4rky ca92022281 fix(utils): preserve _ssl_context when copying SSLCiphers adapter 2026-08-31 11:51:17 -06:00
imSp4rky 57ddefc69b feat(proxy): mask proxy credentials in console and API output
Show user:pass as xxxxx:xxxxx in "Using ... Proxy" lines (full URI with -d), hide Basic provider hostnames, and redact proxy URIs in REST API error responses and remote session logs.
2026-08-31 09:45:19 -06:00
imSp4rky a01ff594da fix(remote): send only the active profile's cache files to the server
The client withheld nothing before: every profile's tokens went to any remote server. Filter by active-credential digests and profile names, keeping service-global files; worst case for a withheld file is a server-side re-auth.
2026-08-30 21:17:20 -06:00
imSp4rky f7b1446427 feat(serve): forward per-session service logs to remote-dl clients
Mirror each remote session's self.log into a bounded buffer, drained by the client via GET /api/session/{id}/logs and re-emitted locally. Server-account sessions get no relay. Also namespace service CLI options under service_params so a transport key (profile) no longer collides with a service's own option, on both the session and download-job paths.
2026-08-30 20:52:18 -06:00
imSp4rky d9b21229c3 feat(serve)!: add server-held accounts for remote sessions
serve.server_accounts lends region-tagged server credentials to remote sessions (round-robin per region, per-key opt-in, per-account cache). Remote sessions no longer fall back to the server's local credentials when the client sends none.
2026-08-28 16:36:39 -06:00
imSp4rky e3f4e52444 feat(serve): add --quiet mode and developer dashboard API
Headless serve with plain stderr logging; /api/dashboard/* (status, sessions, jobs, logs, SSE/poll events) behind a separate serve.dashboard.key.
2026-08-28 13:18:41 -06:00
imSp4rky c49fccf3b5 fix(remote): resolve service names against the remote server
Remote mode resolved names with the local alias table and built an empty stub for any unknown tag, so an unentitled service showed a blank help page. Resolve against the server's tags and aliases, and reject unknown names with the list the server does offer.
2026-08-28 10:54:21 -06:00
imSp4rky 3cb3613565 feat(remote): forward HLS segment filters to remote clients
Add POST /api/session/{id}/segment_filter: the server runs the service's OnSegmentFilter and returns only the unwanted segment URIs, so ads and bumpers are dropped over --remote-only without exposing service code.
2026-08-27 23:56:16 -06:00
imSp4rky e9ed05d4b2 feat(vaults): batch HTTP json vault writes with InsertKeys 2026-08-27 18:21:45 -06:00
imSp4rky 160ca063a6 feat(vaults): batch HTTP json vault writes with InsertKeys
Try one InsertKeys call per 500 content keys, falling back to per-key InsertKey only when the server answers 404; kv copy/sync chunk 500 for json mode.
2026-08-27 18:10:09 -06:00
imSp4rky 4ef577c1d1 fix(tracks): match resolutions per range and codec
An exact height match in one range denied the 16:9 canvas fallback to the others, so a cropped HDR10 or SDR track was dropped whenever an uncropped DV track matched the requested height. Also sweep the hybrid L5 temp files so a killed run cannot leave a stale RPU behind.
2026-08-27 14:32:36 -06:00
imSp4rky dcc1c8af18 feat(serve)!: gate the server's own proxies behind server_proxy
The server no longer spends its configured proxy providers on a remote client unless the API key sets server_proxy. It places the client by geolocating the connection address and asks for a proxy when that region does not match its own.
2026-08-27 12:43:53 -06:00