Commit Graph
183 Commits
Author SHA1 Message Date
TPD94 8f2ead2107 Merge branch 'unshackle-dl:main' into main 2025-10-18 21:06:23 -04:00
Andy a7bde29401 fix: only exclude forced subs when --forced-subs flag is not set
Previously, forced subtitles were incorrectly included when they matched
languages in the lang configuration, even without the --forced-subs flag.
This caused forced subs to appear when using language configs or the -l
parameter, which violated the expected behavior.
2025-10-15 22:39:44 +00:00
Andy 45902bba13 fix: use keyword arguments for Attachment constructor in font attachment
Fixes #24

When attaching fonts for ASS/SSA subtitles, the Attachment class was being
called with positional arguments instead of keyword arguments. This caused
the font Path object to be incorrectly interpreted, leading to an error:
"Invalid URL 'Arial (arial)': No scheme supplied."

Changed Attachment(font, name) to Attachment(path=font, name=name) to
explicitly pass arguments by keyword, ensuring proper parameter handling.
2025-10-13 16:43:31 +00:00
Andy 170a427af0 chore: bump version to 1.4.8 1.4.8 2025-10-08 21:30:01 +00:00
Andy 283736c57b revert: remove tinycss SyntaxWarning suppression and fix isort
Revert the warnings filter added in 2d5e807 as it didn't work as expected to suppress the tinycss SyntaxWarning. Also fix isort order in prd.py for pyplayready imports.
2025-10-08 21:26:26 +00:00
Andy 3f6a7e1f68 feat: add --exact-lang flag for precise language matching
New --exact-lang CLI flag that enables exact language code matching instead of fuzzy matching. This allows users to get specific regional variants without matching all related variants.

Examples:
- `-l es-419` normally matches all Spanish (es-ES, es-419, es-MX)
- `-l es-419 --exact-lang` matches ONLY es-419 (Latin American Spanish)

Fixes language detection issue where specific variants like es-419 (Latin American Spanish) would match all Spanish variants instead of just close regional variants.
2025-10-08 01:54:30 +00:00
TPD94 b48eecacb5 Merge branch 'unshackle-dl:main' into main 2025-10-05 22:03:31 -04:00
Posi+ive e9ba78cec3 Specify 'utf-8' encoding when opening temp file. (#22) 2025-10-05 16:42:21 -06:00
Andy 4cec942613 feat(vaults): add DecryptLabs API support to HTTP vault 2025-10-04 21:58:30 +00:00
Andy d6f8e42f52 feat: add --no-mux flag to skip muxing tracks into container files
Add --no-mux command-line option to allow downloading individual track
files without muxing them into a container file (.mkv/.mka/.mks).
This addresses use cases where users want to download tracks separately,
such as:
- Downloading only subtitles as individual .srt/.vtt files
- Keeping audio/video/subtitle tracks as separate files
- Converting subtitle formats without creating container files
When --no-mux is used:
- Tracks are saved as individual files with descriptive suffixes
- Video tracks: filename.{codec}.ext
- Audio tracks: filename.{language}.{codec}.ext
- Subtitle tracks: filename.{language}.forced.sdh.ext (as applicable)
- Folder structure respects --no-folder flag

Resolves #21
2025-10-01 18:11:40 +00:00
Andy c1e2d68e57 docs: add pysubs2 conversion_method to configuration documentation 2025-10-01 04:19:25 +00:00
Andy acbbe734ab Merge branch 'feature/pysubs2-subtitle conversion' into main 2025-10-01 04:16:06 +00:00
Andy 6d0a210efb fix: (subtitle): Move pysubs2 to not be auto while in "testing" phase. 2025-10-01 04:11:22 +00:00
Sp5rky 26a94b7135 feat: add pysubs2 subtitle conversion with extended format support
- Add pysubs2 as default conversion method for 'auto' mode
- Add support for MicroDVD (.sub), MPL2 (.mpl2), and TMP (.tmp) formats
- Implement convert_with_pysubs2() method with fallback to standard conversion
- Update from_mime() to handle new subtitle format types
- Map all supported formats to pysubs2 format identifiers
- Update docstrings to reflect new capabilities
2025-09-30 14:12:51 -06:00
Sp5rky 2d5e807e7d fix: suppress tinycss SyntaxWarning by initializing filter before imports
Move warnings.filterwarnings() to the very top of __main__.py before any
other imports to ensure it takes effect before tinycss is loaded during
module discovery. This fixes the SyntaxWarning from the unmaintained
tinycss package (a dependency of subby).

refs #20
2025-09-30 13:55:21 -06:00
Sp5rky ebe5012aeb fix: upgrade pyplayready to 0.6.3 and resolve import compatibility issues
- Upgrade pyplayready from >=0.6.0 to >=0.6.3
- Upgrade subby to 0.3.23 (commit 5a925c36) for lxml 6.x compatibility
- Upgrade lxml from 5.4.0 to 6.0.2
- Fix pyplayready exception imports to use root-level imports (compatible with both 0.6.0 and 0.6.3)
- Suppress SyntaxWarning from unmaintained tinycss dependency

The pyplayready package changed its API between versions:
- v0.6.0: exceptions in pyplayready.exceptions module
- v0.6.3: exceptions in pyplayready.misc.exceptions module
Using root-level imports (from pyplayready import ...) works with both versions.

ref #20
2025-09-30 13:50:17 -06:00
Sp5rky 06c4c02312 Merge branch 'main' of https://github.com/unshackle-dl/unshackle 2025-09-30 12:54:25 -06:00
Sp5rky c77a8737ef fix: update lxml constraint and pyplayready import path
- Update lxml dependency to allow version 6.x (required by subby 0.3.23)
- Fix pyplayready exception import path (moved to misc.exceptions in 0.6.3)

fixes #17
2025-09-30 12:54:13 -06:00
TPD94 3a8dfb26fe Merge branch 'unshackle-dl:main' into main 2025-09-30 02:18:58 -04:00
Andy e0154741f0 fix: dl.py
old leftover bug, sub-format was default to SRT
2025-09-30 05:03:22 +00:00
TPD94 c9bb0e4224 Merge branch 'unshackle-dl:main' into main 2025-09-30 00:15:09 -04:00
TPD94 e1e2e35ff4 Update binaries.py to check subdirs in binaries folders named after the binary 2025-09-30 00:14:44 -04:00
TPD94 ceea4ac827 Fixed RemoteCDM, added curl_cffi to instance checks. (#18)
* Fix remoteCDM, add curl_cffi to instance check

* Update dash.py
2025-09-29 20:57:42 -06:00
TPD94 03f08159b4 Update dash.py 2025-09-29 21:01:55 -04:00
TPD94 724703d14b Update .gitignore 2025-09-29 20:56:25 -04:00
TPD94 da00258ae0 Merge branch 'unshackle-dl:main' into main 2025-09-29 20:55:05 -04:00
TPD94 4f3d0f1f7a Update .gitignore 2025-09-29 20:54:42 -04:00
TPD94 bade3f8c09 Update .gitignore 2025-09-29 20:53:38 -04:00
TPD94 55f116f1e8 Delete .idea directory 2025-09-29 20:53:16 -04:00
TPD94 2e2f8f5099 Fix remoteCDM, add curl_cffi to instance check 2025-09-29 20:48:59 -04:00
Andy e92e5c2ba3 feat: add AC4 codec support in Audio class and update mime/profile handling 2025-09-26 04:42:06 +00:00
Andy 30314fdb46 Fix missing movie/episode changes for last commit 2025-09-26 01:41:07 +00:00
Andy a2c6798fe6 fix: optimize audio track sorting by grouping descriptive tracks and sorting by bitrate, fixes bug that does not identify ATMOS or DD+ as the highest quality available in filenaming. 2025-09-25 23:21:35 +00:00
Andy bc26bf3046 feat: update changelog for version 1.4.7 1.4.7 2025-09-25 06:29:46 +00:00
Andy 35efdbff6d feat: add curl_cffi session support with browser impersonation
Add new session utility with curl_cffi support for anti-bot protection
Update all manifest parsers (DASH, HLS, ISM, M3U8) to accept curl_cffi sessions
Add browser impersonation support (Chrome, Firefox, Safari)
Fix cookie handling compatibility between requests and curl_cffi
Suppress HTTPS proxy warnings for better UX
Maintain full backward compatibility with requests.Session
2025-09-25 06:27:14 +00:00
Andy 63b7a49c1a feat: Add decrypt_labs_api_key to Config initialization and change duplicate track log level to debug 2025-09-25 06:22:50 +00:00
Andy 98ecf6f876 feat: Add download retry count option to download function 2025-09-23 01:32:00 +00:00
Andy 5df6914536 feat: Add options for required subtitles and best available quality in download command 2025-09-23 01:28:55 +00:00
Andy c1df074965 Change new dynamic CDM selection text to be in Debug only 2025-09-14 04:25:57 +00:00
Andy da60a396dd Fix: Prevent KeyError when reusing remote CDMs in dynamic selection
Creates a copy of the CDM dictionary before modification to prevent the original configuration from being mutated, allowing the same CDM to be selected multiple times within a session without errors.
2025-09-14 01:14:01 +00:00
Andy a99a391395 chore: bump version to 1.4.6 and update changelog 1.4.6 2025-09-13 04:01:45 +00:00
Andy ed32939d83 feat: Add quality-based CDM selection for dynamic CDM switching
Implements dynamic CDM selection based on video track resolution to optimize
CDM usage. Automatically selects appropriate security level (L3/SL2K for ≤1080p, L1/SL3K for >1080p) based on content requirements.

Key Features:
- Quality-based CDM configuration with threshold operators (>=, >, <=, <)
- Pre-selection based on highest quality across all video tracks
- Maintains backward compatibility with existing CDM configurations
- Single CDM per session to avoid inefficient switching
2025-09-13 03:59:13 +00:00
Andy 4006593a8a Fix: Implement lazy DRM loading for multi-track key retrieval
- Add deferred DRM loading to M3U8 parser to mark tracks for later processing
- Optimize prepare_drm to load DRM just-in-time during download process
2025-09-12 06:38:14 +00:00
Andy 307be4549b Fix vault caching count and NoneType iteration issues
- Fix 'NoneType' object is not iterable error in decrypt_labs_remote_cdm
- Fix vault count display showing 0/3 instead of actual successful vault count
2025-09-10 06:33:46 +00:00
Andy a82828768d feat: automatic audio language metadata for embedded audio tracks
- Add intelligent embedded audio language detection at mux stage
- Automatically set audio language metadata when no separate audio tracks exist
- Respect user flags (-V, --no-audio) to avoid unnecessary processing
- Smart video track selection based on title language with fallbacks
- Improved default track selection to prioritize title language matches
- Enhanced FFmpeg repackaging with audio stream metadata injection
- Works automatically for all services without service-specific code
2025-09-10 00:57:14 +00:00
Andy d18a5de0d0 fix: Improve import ordering and code formatting
- Reorder imports in decrypt_labs_remote_cdm.py for better organization
- Clean up trailing whitespace in SQLite.py
2025-09-10 00:53:52 +00:00
Andy 04b540b363 fix: Resolve service name transmission and vault case sensitivity issues
Fixed DecryptLabsRemoteCDM sending 'generic' instead of proper service names and added case-insensitive vault lookups for SQLite/MySQL vaults. Also added local vault integration to DecryptLabsRemoteCDM
2025-09-09 18:53:11 +00:00
Andy 6137146705 chore: bump version to 1.4.5 and update changelog
- Update version from 1.4.4 to 1.4.5 in core/__init__.py
- Add comprehensive changelog entry for v1.4.5 with all changes since 1.4.4
- Include enhanced CDM support, caching improvements, and bug fixes
1.4.5
2025-09-09 03:53:42 +00:00
Andy 859d09693c feat(cdm): Update User-Agent to use dynamic version
- Replace hardcoded version "1.0" with dynamic version import in DecryptLabsRemoteCDM User-Agent header.
2025-09-09 03:49:01 +00:00
Andy 5f022635cb feat(cdm): Optimize get_cached_keys_if_exists for L1/L2 devices
- Always send get_cached_keys_if_exists=True for L1/L2 devices to leverage
- the API's automatic caching optimization. This reduces unnecessary license
- requests by prioritizing cached keys for these security levels.
2025-09-06 22:10:35 +00:00