Commit Graph

379 Commits

Author SHA1 Message Date
CodeName393
dd19f405a4 Add selector 2026-02-09 02:21:04 +09:00
CodeName393
dbebf68f18 Add select-titles 2026-02-09 02:20:26 +09:00
Andy
6b8a8ba8a8 feat(cdm): normalize CDM detection for local and remote implementations
Add unshackle.core.cdm.detect helpers to classify CDMs consistently across local and remote backends.

- Add is_playready_cdm/is_widevine_cdm for DRM selection across pyplayready, pywidevine, and wrappers

- Add is_remote_cdm/is_local_cdm/cdm_location so services can branch on CDM execution location

- Switch core DASH/HLS parsing, track DRM selection, and dl CDM switching away from brittle isinstance/DecryptLabs-only checks

- Make unshackle.core.cdm import-light via lazy __getattr__ so optional CDM deps are only imported when needed
2026-02-08 00:37:53 -07:00
Andy
b9fb928292 fix(service): redact proxy credentials in logs
Proxy URIs may contain embedded userinfo (username/password). Add a small sanitizer helper and use it for proxy mapping and proxy selection logs to avoid leaking credentials.
2026-02-07 20:36:25 -07:00
Andy
984a8b9efa fix(proxies): harden surfshark and windscribe selection 2026-02-07 20:34:31 -07:00
Andy
71adee4ec6 fix(api): log PSSH extraction failures 2026-02-07 20:29:53 -07:00
Andy
ee8f7cb650 docs(config): clarify sdh_method uses subtitle-filter 2026-02-07 20:29:31 -07:00
Andy
d576174f62 fix(naming): keep technical tokens with scene_naming off
Title filenames now include resolution/service/WEB-DL/codecs/HDR tokens in both modes; scene_naming only changes the spacer ('.' vs ' ').

Also avoid overwriting muxed outputs by disambiguating on collision (append codec suffix when needed, then a numeric suffix).
2026-02-07 20:24:32 -07:00
Andy
425b3764f4 fix(titles): avoid None/double spaces in HDR tokens
Ensure dynamic-range tokens use safe fallback when not in DYNAMIC_RANGE_MAP and append exactly one space-separated token without trailing/double spaces.
2026-02-07 19:55:45 -07:00
Andy
29f0e4eee8 fix(config): normalize playready_remote remote_cdm keys 2026-02-07 19:47:21 -07:00
Andy
44ea9a90a7 fix(titles): remove trailing space from HDR dynamic range label 2026-02-07 19:46:35 -07:00
Andy
96411e5d7d fix(hls): keep range offset numeric and align MonaLisa licensing
- Parse init section byterange offset as int to avoid string arithmetic bugs

- Wrap MonaLisa licensing in the same progress + error handling flow as Widevine/PlayReady
2026-02-07 19:44:23 -07:00
Andy
d404f213b1 fix(dl): avoid selecting all variants when multiple audio codecs requested
When --a-lang is specific (not best/all) and multiple codecs are requested via -a/--acodec, select only the best-bitrate track per codec per language (plus descriptive if --audio-description).

Blame: regression introduced by 939ca25 (fix(dl): keep descriptive and standard audio for requested langs).
2026-02-07 19:37:48 -07:00
Andy
6c83790834 fix(monalisa): avoid leaking secrets and add worker safety
- Pass ML-Worker key via env/stdin instead of argv to reduce exposure in process listings/logs.

- Add a hard timeout to the ML-Worker subprocess call and convert timeouts into DecryptionFailed errors.

- Make ticket bytes decoding defensive: try UTF-8, fall back to ASCII (base64), otherwise raise a descriptive ValueError.
2026-02-07 19:24:15 -07:00
Andy
a04f1ad4db fix(gluetun): stop leaking proxy/vpn secrets to process list
- Switch docker run to use a temporary --env-file instead of per-var -e flags\n- Ensure temp env file is always removed (best-effort overwrite + unlink)\n- Tighten _is_container_running to exact-name matching via anchored docker filter\n- Close requests.Session used for IP verification to release connections\n- Redact more secret-like env keys in debug logs\n
2026-02-07 19:22:13 -07:00
Andy
774b9ba96c fix(dl): preserve proxy_query selector (not resolved URI) 2026-02-07 19:09:29 -07:00
Andy
0b9a3a75f8 fix(serve)!: make PlayReady users config consistently a mapping
Ensure playready_config['users'] and API-only config always use a dict, even under --no-key, to avoid type mismatches.

Also stop implicitly granting PlayReady access by defaulting per-user 'playready_devices' to all devices; missing 'playready_devices' now defaults to an empty list and logs a warning including the user key.

BREAKING CHANGE: users without an explicit 'playready_devices' list no longer get access to all PlayReady devices by default.
2026-02-07 19:06:22 -07:00
Andy
c7d4a68cbf fix(aria2c): warn on config mismatch and wait for RPC ready
When ensure_started() is called while aria2c is already running, it now compares the requested proxy/max_workers against the values the process was started with and logs a warning if they differ (since the running process cannot be reconfigured in-place). Startup no longer uses a fixed sleep; instead it probes the JSON-RPC endpoint with a bounded retry loop (aria2.getVersion) and only proceeds once RPC is responsive, terminating the subprocess and raising on timeout.
2026-02-07 19:04:39 -07:00
Andy
4bc2e93d09 fix(dl): support snake_case keys for RemoteCdm
Use safe get() fallbacks for RemoteCdm config keys and default security_level to 3000 to avoid KeyError when snake_case is used.
2026-02-07 19:00:12 -07:00
Andy
de41395a45 fix(dl): invert audio codec suffixing when splitting 2026-02-07 18:56:30 -07:00
Andy
e50dd3f2bc Merge branch 'dev' of https://github.com/unshackle-dl/unshackle into dev
# Conflicts:
#	CHANGELOG.md
2026-02-07 18:47:23 -07:00
Andy
6f3aafebc5 docs(changelog): update cliff config and regenerate changelog
merge commit filtering, deduplication, granular chore parsing, and regenerate CHANGELOG.md using git-cliff.
2026-02-07 18:46:43 -07:00
Andy
a66234190c docs(changelog): complete 2.4.0 notes 2026-02-07 18:05:03 -07:00
Andy
62aa85c666 chore(release): bump version to 2.4.0 2026-02-07 14:52:54 -07:00
Andy
03c309303c fix(downloader): restore requests progress for single-url downloads 2026-02-06 23:34:15 -07:00
Andy
ace89760e7 fix(hls): finalize n_m3u8dl_re outputs
- Add a small helper to move N_m3u8DL-RE final outputs into the expected temp path (preserve actual suffix) and keep subtitle codec consistent with the produced file.
- Skip generic HLS segment merging when N_m3u8DL-RE is in use to avoid mixing in sidecar files and reduce Windows file-lock issues.
- Harden segmented WebVTT merging to avoid IndexError when caption segment indexes exceed the provided duration list.
2026-02-06 16:17:06 -07:00
Andy
3eede98376 Merge branch 'fix/hybrid-temp-cleanup' 2026-02-06 11:16:44 -07:00
Andy
57918cd2a3 fix(dl): always clean up hybrid temp hevc outputs 2026-02-06 11:15:05 -07:00
Sp5rky
001d15e651 Merge pull request #75 from CodeName393/Remove-hybrid-havc-temp-file
Remove hybrid havc temp file
2026-02-06 11:14:45 -07:00
Andy
2308644374 chore(api): remove remote services 2026-02-06 10:46:39 -07:00
CodeName393
8f0b9eafd7 Remove hybrid havc temp file
Add a hybrid track to the track processing list to fix the problem that the hybrid-processed hevc file remains in the temp folder.
2026-02-06 17:53:48 +09:00
Andy
939ca25c5b fix(dl): keep descriptive and standard audio for requested langs
When --audio-description is set, keep standard selections and include descriptive tracks for requested languages, including --a-lang with orig and best selection paths.

Fixes #72
2026-02-05 12:57:52 -07:00
Sp5rky
58903c7b14 Merge pull request #70 from CodeName393/Missing-HLS-Curl-Session-Processing
Fix Missing HLS Curl Session Processing
2026-02-05 12:43:27 -07:00
CodeName393
3fa4a81a39 Fix Missing HLS Curl Session Processing 2026-02-05 19:25:51 +09:00
Andy
b16610ac63 fix(progress): bind per-track bars and force terminal completion 2026-02-04 12:55:02 -07:00
Andy
5fae23eb99 feat(proxy): add specific server selection for WindscribeVPN 2026-02-04 19:49:52 +00:00
Andy
6186ff764b fix(progress): force track bar completion on terminal states 2026-02-04 12:31:49 -07:00
Sp5rky
207756c090 Merge pull request #69 from CodeName393/HDR-Vivid-File-Name-Processing
Fixed HDR Vivid showing the file name Range as 'None'
2026-02-04 12:24:24 -07:00
CodeName393
9e194f4868 Fix 2026-02-05 02:51:24 +09:00
CodeName393
5b50a6cd79 HDR Vivid 2026-02-05 02:50:03 +09:00
CodeName393
289c8a3b23 HDR Vivid 2026-02-05 02:49:50 +09:00
Andy
a6494d9b54 fix(dl): prevent attachment downloads during --skip-dl
Set DOWNLOAD_LICENCE_ONLY earlier in the download command so services build tracks in license-only mode.

Update Attachment URL handling to avoid eager downloads in license-only mode while keeping metadata, stable IDs, and safe cleanup behavior.
2026-02-03 21:20:26 -07:00
Andy
c83b7a853e fix(mux): avoid audio codec suffix on split-audio outputs 2026-02-03 17:21:51 -07:00
Andy
b70c350d0b docs(changelog): add 2.4.0 release notes 2026-02-03 13:54:32 -07:00
Andy
cacb695093 fix(subtitles): preserve sidecar originals
Use original subtitle files for sidecar output while keeping muxed conversion behavior.

Fixes #59
2026-02-02 21:43:27 -07:00
Andy
64875e8371 Merge branch 'quiet-sleeping-crane' into dev 2026-02-02 20:51:17 -07:00
Andy
5b9be075de feat(audio): codec lists and split muxing 2026-02-02 20:51:09 -07:00
Andy
1cde8964c1 fix(dash): preserve MPD DRM instead of overwriting from init segment
The init_data DRM extraction was unconditionally overwriting DRM already extracted from MPD ContentProtection elements. This caused failures when init segments contain malformed PSSH data while the MPD has valid PSSH.

Now only falls back to init_data extraction when no DRM was found from the manifest, matching the behavior in version 2.1.0.
2026-02-02 12:02:16 -07:00
Andy
cc55fd8922 fix(dash): add CENC namespace support for PSSH extraction
Some MPD manifests use the cenc: namespace prefix for PSSH elements (e.g., <cenc:pssh>) instead of non-namespaced <pssh>. This caused DRM extraction to fail for services.

- Add {urn:mpeg:cenc:2013}pssh fallback for Widevine PSSH extraction
- Add {urn:mpeg:cenc:2013}pssh fallback for PlayReady PSSH extraction
2026-02-02 10:59:15 -07:00
Andy
84466e12de Merge branch 'feat/monalisa-drm' into dev 2026-02-02 08:25:43 -07:00