Commit Graph

122 Commits

Author SHA1 Message Date
CodeName393
c78a649170 Fix 2 2026-02-25 01:34:58 +09:00
Andy
8b63be4f3e feat(dl): add --repack flag to insert REPACK tag in output filenames 2026-02-22 11:42:35 -07:00
Andy
8a4399665e fix(dl): handle cross-device moves when temp and downloads differ 2026-02-22 10:52:04 -07:00
Andy
4814ba9144 fix(dl): overwrite existing files on re-download and use atomic replace
The collision-avoidance logic was preventing overwrites of files from previous runs.

Also switch subtitles with OnSegmentFilter from n_m3u8dl_re to the requests downloader so segment filtering works at download time.
2026-02-21 15:33:07 -07:00
Andy
ff093a7896 fix(dl): allow selection of audio tracks for 'all' languages in addition to 'best' 2026-02-20 21:40:41 -07:00
Andy
829ae01000 fix(hybrid): accept HDR10+ tracks as valid base layer for HYBRID mode
HYBRID mode previously required a plain HDR10 track, rejecting HDR10+ (HDR10P) even though it's a perfectly valid (and superior) base layer.
HDR10+ is now preferred over HDR10 when both are available, preserving dynamic metadata in the final DV Profile 8 output.
2026-02-18 15:56:55 -07:00
Andy
42ee9d67a3 fix(hybrid): skip bitrate filter for DV tracks in HYBRID mode 2026-02-17 15:38:55 -07:00
Andy
b0f5b11820 feat(debug): log binary tool versions at session start 2026-02-17 14:39:28 -07:00
Andy
0217086abf style: fix ruff E721, E701, and E722 lint errors 2026-02-16 13:37:23 -07:00
Sp5rky
9f9a609d71 Merge pull request #77 from CodeName393/Select-Titles
Add Select titles option
2026-02-15 16:19:42 -07:00
Andy
c5b063391c fix(serve): default PlayReady access to none
Remove unreachable fallback to all devices; if a user has no explicit playready_devices configured, the PlayReady subapp receives an empty list (secure-by-default).
2026-02-08 20:00:39 -07: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
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
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
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
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
57918cd2a3 fix(dl): always clean up hybrid temp hevc outputs 2026-02-06 11:15:05 -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
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
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
5b9be075de feat(audio): codec lists and split muxing 2026-02-02 20:51:09 -07:00
Andy
ecedcb93eb fix(drm): hide Shaka Packager message for MonaLisa decryption 2026-02-02 08:24:13 -07:00
Andy
3fcad1aa01 feat(drm): add MonaLisa DRM support to core infrastructure
- Add MonaLisaCDM class wrapping wasmtime for key extraction
- Add MonaLisa DRM class with decrypt_segment() for per-segment decryption
- Display Content ID and keys in download output (matching Widevine/PlayReady)
- Add wasmtime dependency for WASM module execution
2026-01-31 22:05:44 -07:00
Andy
caf67a6998 feat(env): add ML-Worker binary for DRM licensing 2026-01-31 16:58:10 -07:00
Andy
385fcb2752 Revert "Merge pull request #64 from Aerglonus/dev"
This reverts commit 55bc2b16ee, reversing
changes made to 8c8c9368ba.
2026-01-30 15:52:06 +00:00
Aerglonus
a96bc9e4a6 fix(proxies): Fixes WindscribeVPN server authentication 2026-01-27 00:48:03 -06:00
Andy
ab762fc81f fix(serve): correct PlayReady RemoteCDM server validation 2026-01-26 22:01:47 -07:00
Andy
4b1d938b49 feat(cdm): add remote PlayReady CDM support via pyplayready RemoteCdm 2026-01-26 01:08:54 -07:00
Andy
98d579dc9b feat(serve): add PlayReady CDM support alongside Widevine 2026-01-26 00:48:20 -07:00
Andy
91a2d76f88 refactor: remove remote-service code until feature is more complete
Temporarily removes client-side remote service discovery and authentication until the implementation is more fleshed out and working.
2026-01-24 16:10:45 -07:00
Andy
4b30090d87 feat(gluetun): improve VPN connection display and Windscribe support 2026-01-24 13:36:04 -07:00
Andy
e77f000494 feat: Gluetun VPN integration and remote service enhancements
Major features:
- Native Docker-based Gluetun VPN proxy provider with multi-provider support
  (NordVPN, Windscribe, Surfshark, ExpressVPN, and 50+ more)
- Stateless remote service architecture with local session caching
- Client-side authentication for remote services (browser, 2FA, OAuth support)

Key changes:
- core/proxies/windscribevpn.py: Enhanced proxy handling
- core/crypto.py: Cryptographic utilities
- docs/VPN_PROXY_SETUP.md: Comprehensive VPN/proxy documentation
2026-01-24 11:23:13 -07:00
Andy
af49560345 Merge branch 'main' into dev 2026-01-22 14:47:25 -07:00
Sp5rky
73a4bf8764 Merge pull request #53 from CodeName393/main
Merging after code review - fixes binary path handling
2026-01-22 13:53:23 -07:00
Andy
9463870da7 fix(serve): use correct pywidevine users config format
pywidevine's serve module expects users to be a dict mapping secret keys to user objects with devices and username, not a simple list.
This was causing TypeError when accessing CDM endpoints.
2026-01-22 17:33:19 +00:00
Andy
18b0534020 fix(subs): strip whitespace from ASS font names
Use removeprefix instead of removesuffix and add strip() to handle ASS subtitle files that have spaces after commas in Style definitions.

Fixes #57
2026-01-16 13:42:11 +00:00
Andy
ede38648db fix(util): improve test command error detection and add natural sorting 2026-01-07 16:22:45 +00:00
Andy
dc9823cd28 chore(release): bump version to 2.1.0 2025-11-27 23:35:56 +00:00
Andy
6fa3554b70 fix(dl): preserve attachments when rebuilding track list
Attachments (screenshots, fonts) were being dropped when title.tracks was rebuilt from kept_tracks, causing image files to remain in temp directory after muxing. The cleanup code iterated over an empty attachments list since they were orphaned during track filtering.
2025-11-27 23:03:53 +00:00
Andy
965482a1e4 feat: merge upstream dev branch
- Add Gluetun dynamic VPN-to-HTTP proxy provider
   - Add remote services and authentication system
   - Add country code utilities
   - Add Docker binary detection
   - Update proxy providers
2025-11-25 20:23:06 +00:00
Andy
3b32462251 feat(cdm): add per-track quality-based CDM selection during runtime DRM switching
Enable quality-based CDM selection during runtime DRM switching by passing track quality to get_cdm() calls. This allows different CDMs to be used for different video quality levels within the same download session.

Example configuration:
  cdm:
    SERVICE:
      "<=1080": wv_l3_local     # Widevine L3 for SD/HD
      ">1080": pr_sl3_remote    # PlayReady SL3 for 4K
2025-11-16 21:59:10 +00:00
Andy
7cc4af207e feat(export): enhance track export with URL, descriptor, and hex-formatted keys 2025-11-15 18:20:47 +00:00
Andy
9488a40f51 feat(dl): add --no-video flag to skip video track downloads
Add new -nv/--no-video CLI flag that allows users to download audio, subtitles, attachments, and chapters without downloading video tracks.

Fixes #39
2025-11-10 22:12:15 +00:00
Andy
55db8da125 refactor: remove unnecessary underscore prefixes from function names 2025-11-08 22:53:47 +00:00
Andy
5d20bf9d52 fix(subtitles): fix closure bug preventing SDH subtitle stripping
Fixed a Python late binding closure issue in the SDH subtitle duplication logic that prevented strip_hearing_impaired() from being called correctly.
2025-11-08 22:49:23 +00:00