Commit Graph
1013 Commits
Author SHA1 Message Date
imSp4rky c06b00ec63 fix(import): read an HLS export that names no title language or master key
Probe each media playlist for its KIDs and refuse a manifest unshackle cannot read.
2026-09-23 16:20:49 -06:00
imSp4rky 1af7d86b88 test(import): assert on the ClickException, not the wrapped error panel
A long tmp path on macOS and Windows runners made rich-click split the message across lines.
2026-09-23 16:07:33 -06:00
imSp4rky bc50167791 fix(import): give no title keys to a track that is clear
A subtitle, or a track the export lists no KID for while it lists others, gets no DRM.
2026-09-23 15:52:57 -06:00
imSp4rky 28ddd08917 fix(import): say an import uses the export's keys, not a server CDM
The CDM type stub now follows the exported DRM system.
2026-09-23 15:48:50 -06:00
imSp4rky d014c69d00 feat(export): separate export file name parts with dots
Titles, scope and quality parts use dots and never follow output_template.
2026-09-23 15:26:46 -06:00
imSp4rky 878838de30 build(deps): lock mediaexport at fa9357e 2026-09-23 15:17:30 -06:00
imSp4rky a19c3e3879 fix(export): name the file from the first write 2026-09-23 15:11:15 -06:00
imSp4rky 347668eafa docs(export): describe the export file name and its messages 2026-09-23 15:11:15 -06:00
imSp4rky ce42cd245b feat(export): name export files after their titles and tracks
Log what each title and the run exported.
2026-09-23 15:11:14 -06:00
imSp4rky 80088fe4f6 feat(import): build tracks from direct-file export rows
Imports unidl json_manifest exports made of whole files.
2026-09-23 15:04:22 -06:00
imSp4rky 06866eb12e feat(export): record each track's KIDs
An import reads them first, so a track gets its own keys without a probe.
2026-09-23 14:35:58 -06:00
imSp4rky 84bb07f589 fix(import): stop clearly when no export or vault key exists
The bad-key retry now requests each dropped KID.
2026-09-23 14:33:34 -06:00
imSp4rky fc26297ff0 fix(import): give each track only the keys it declares
The whole title pool stays the fallback for a track that declares no KID.
2026-09-23 14:30:17 -06:00
imSp4rky 47f30668ee fix(drm): give the zero-KID fallback only the track's own key
mp4decrypt and shaka use the last key for a repeated KID.
2026-09-23 14:27:30 -06:00
imSp4rky f470eed703 fix(import): report refused titles and fail when none is usable 2026-09-23 13:30:36 -06:00
imSp4rky 224e066adb fix(export): skip bad keys and failed writes without stopping the download 2026-09-23 13:30:36 -06:00
imSp4rky 4c8c630dd1 test(export): cover header stripping and key merging 2026-09-23 13:30:35 -06:00
imSp4rky 8a942e7795 fix(import): read export files through mediaexport
The command still required the old v2 format.
2026-09-23 13:30:35 -06:00
imSp4rkyandAntCardFr 783c8ae1c2 feat(proxies): add Control D proxy provider
Runs a loopback forwarder per region-named profile (unshackle-<region>), so
--proxy and --proxy-download can exit in different countries

Thanks to Orni_ for the original code and the test account.

Co-authored-by: AntCardFr <24798811+AntCardFR@users.noreply.github.com>
2026-09-23 13:23:50 -06:00
imSp4rky ed3159378f build(deps): pull mediaexport from github in the package metadata 2026-09-23 11:29:37 -06:00
imSp4rky ba819aa11e fix(export): strip session headers from exports and normalise merged keys 2026-09-23 11:19:26 -06:00
imSp4rky 30ea001cb3 Merge branch 'feat/new-export' into dev 2026-09-23 11:12:19 -06:00
imSp4rky b36db97ffd fix(serve): stop repeating server vault pushes and retry failed ones 2026-09-22 20:23:22 -06:00
imSp4rky c7c19ae06e fix(dl): skip empty vault pushes and count cached keys once
A licence that repeats vault keys no longer sends an empty InsertKeys, --cdm-only no longer logs "Cached N Keys to 0/0 Vaults", and a key two tracks both licensed counts once.
2026-09-22 19:54:18 -06:00
imSp4rky db771a13c6 fix(remote): forward dl track selection and profile to remote sessions
Remote sessions now carry -l/-vl/-al/-a/-fs under a nested dl_params, so services fetch the requested audio versions. Server-account tokens for non-default accounts move from default to the account name, so each account logs in once after upgrade.
2026-09-22 12:52:05 -06:00
imSp4rky b988951e17 test(vaults): widen the timing margin in the parallel retry test 2026-09-22 10:59:11 -06:00
imSp4rky 4639d9d496 fix(remote): let the server's CDM mapping decide the DRM system under server_cdm
A client with a local PlayReady device asked the server for a PlayReady licence on a service the server maps to a Widevine device. Both server_cdm routes now share one candidate list from one config lookup, report the system that licensed in drm_type, and the client adopts it.
2026-09-22 10:54:31 -06:00
imSp4rky d239964f0b fix(serve): apply staged service reloads when sessions end, with a max staging age
A staged tag was only retried on the refresh tick or a job completion, so a service with steady remote sessions never swapped in. Session end, expiry and eviction now trigger a single-flight apply, the tick applies after the pull, and serve.services_staged_max_age swaps an overdue tag in even while busy.
2026-09-22 10:40:49 -06:00
imSp4rky 6e681af513 feat(manifests): extend merge_segments rolling merge to HLS and ISM
RollingMerge takes the segment path and an append hook. ISM synthesises the init from segment 0 and converts PIFF per fragment; HLS qualifies only with one init, one key and no discontinuity. Both parsers check the merge reached every segment, and resume is decided per track.
2026-09-21 20:53:37 -06:00
imSp4rky 79d109d548 feat(dash): add merge_segments to append segments during the download
Opt-in rolling merge for DASH video and audio: each contiguous segment is appended to the output as it lands, so the post-download "Merging" stage goes away. Decrypts the init segment eagerly when decrypt_segments is on, disables resume for the track, and skips subtitle tracks.
2026-09-21 19:13:39 -06:00
imSp4rky b182ed97f2 fix(post-scripts): expose {part} and all title-owned variables on failure
Build the failure context through the title's template builder with an empty MediaInfo, and blank season_episode, absolute and date in season mode. Document {part} and add a docs-to-code parity test.
2026-09-20 13:32:20 -06:00
imSp4rky a254830121 fix(export): import side-loaded subtitles and keep conflicting keys apart
The importer builds subtitle tracks from track rows that carry a url, which the format promised and no reader did. The writer keeps a conflicting KID instead of overwriting it, identifies a manifest by its whole URL, writes subtitle rows as srt or vtt rather than enum names, and survives an export file it cannot read.
2026-09-20 10:39:13 -06:00
imSp4rky b8f00f6b95 fix(remote): keep the server's own CDM when the tier licenses with server_cdm 2026-09-20 01:19:48 -06:00
imSp4rky 746385101b feat(export): write mediaexport files and read legacy exports through the package
--export writes the mediaexport format with DRM, content keys and manifests at title level, and unshackle's own track dicts under x-unshackle. unshackle import reads mediaexport, unidl v1 and unshackle v2 through the shared reader, applies the export's request headers to the import session, and rebuilds DRM from the title-level pool. mediaexport is a git dependency on unshackle-dl/mediaexport.
2026-09-20 00:07:04 -06:00
imSp4rky 025499efa7 test(vaults): fix the vault-write fakes is_flagged and log.error 2026-09-19 22:42:26 -06:00
imSp4rky cd6a38aec8 fix(remote): stop warning about missing keys for tracks that carry no DRM
The server names the clear tracks in the licence response and the client skips them instead of warning for every requested track without keys.
2026-09-19 22:05:30 -06:00
imSp4rky 9c9e059e2d fix(remote): forward nested service cache files to and from the server
Cache keys are now the path relative to the service cache dir without .json, so Cacher keys like session_web/<sha1> reach the remote session. The credential filter runs on every path segment, the suffix is appended rather than substituted, and both sides cap the map at 64 keys.
2026-09-19 21:42:01 -06:00
imSp4rky af866e0c95 fix(vaults): harden the KID window check and clear a stale flag on licence 2026-09-18 17:57:00 -06:00
imSp4rky b30e6d7cbe fix(vaults): verify vault content keys per KID from the fragment map
Map each KID to its fragments from the ciphertext moov/moof (tenc, seig, ISM duration clock) and decode up to three windows per KID that never cross into another KID, so a clear lead cannot hide a wrong key and only the failing KID is flagged. Decode every frame (wrong-key HEVC keyframes decode clean), re-judge mid-GOP starts on keyframes, time out every FFmpeg run, and refuse to store a flagged pair again in SQLite.
2026-09-18 01:10:14 -06:00
imSp4rky cf2906f120 fix(cli): make the click param types the one source of codec spellings
--acodec now lists its codecs in --help, --vcodec drops the duplicate entries, and the REST API derives its allowlists from the same types, so AC-4, DDP, VORB and sub_format "original" stop being rejected and H264 stops being silently dropped. Adds shell completion for --acodec and repairs MultipleChoice completion. Raises the click floor to 8.2.
2026-09-17 19:22:19 -06:00
imSp4rky 372eb5ccf1 fix(drm): log missing Widevine/PlayReady PSSH at debug level 2026-09-17 11:27:27 -06:00
imSp4rky dfaeb83076 fix(remote): honor proxy client cdm_type for DRM system selection 2026-09-16 22:39:03 -06:00
imSp4rky ffda836442 fix(remote): return session cache for device-code and cache-only logins
Answered login prompts and uploaded cache now count as client auth; the client closes on exit and keeps the remote session alive during long downloads.
2026-09-16 19:36:31 -06:00
imSp4rky aec45e30cc feat(service): add GEOBLOCK negative geofence
Regions in GEOBLOCK refuse the service and everything else is allowed. A hit stops the run with a region error instead of auto-proxying; the check also covers proxy exits and the remote-dl client region.
2026-09-16 15:06:43 -06:00
imSp4rky 1a993f4cb9 docs(cli): correct --merge-video scope in cli reference 2026-09-15 09:47:15 -06:00
imSp4rky aa36d4c225 feat(vaults): report bad keys to the vault that served them 2026-09-13 20:46:38 -06:00
imSp4rky a0515f8d57 feat(dl): add --proxy-download for a separate download proxy
Manifest, licence and auth stay on --proxy; track, subtitle and attachment downloads use the second proxy. Also exposed as proxy_download on the REST download job with the same server_proxy gate. The download session now ignores HTTP(S)_PROXY and copies rnet cookies set by name.
2026-09-13 14:41:01 -06:00
imSp4rky e40421a855 fix(serve): defer service hot reload while a remote session uses it
Remote-only serve no longer builds the download queue manager just to read busy services.
2026-09-13 12:21:31 -06:00
imSp4rky 2ae26cf731 fix(main): remove unwanted - 2026-09-13 11:39:40 -06:00
imSp4rky 70c3a05552 fix(import): inject only the imported title's keys into each track 2026-09-12 20:30:56 -06:00