Skip to content

Commit 0bc8c63

Browse files
author
Andy
committed
Merge branch 'dev'
2 parents d658b1b + 76d7335 commit 0bc8c63

42 files changed

Lines changed: 6999 additions & 604 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ unshackle/certs/
2525
unshackle/WVDs/
2626
unshackle/PRDs/
2727
temp/
28+
logs/
2829
services/
2930

3031
# Byte-compiled / optimized / DLL files
@@ -217,6 +218,7 @@ cython_debug/
217218
# you could uncomment the following to ignore the entire vscode folder
218219
.vscode/
219220
.github/copilot-instructions.md
221+
CLAUDE.md
220222

221223
# Ruff stuff:
222224
.ruff_cache/

CHANGELOG.md

Lines changed: 154 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,159 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0] - 2025-11-10
9+
10+
### Breaking Changes
11+
12+
- **REST API Integration**: Core architecture modified to support REST API functionality
13+
- Changes to internal APIs for download management and tracking
14+
- Title and track classes updated with API integration points
15+
- Core component interfaces modified for queue management support
16+
- **Configuration Changes**: New required configuration options for API and enhanced features
17+
- Added `simkl_client_id` now required for Simkl functionality
18+
- Service-specific configuration override structure introduced
19+
- Debug logging configuration options added
20+
- **Forced Subtitles**: Behavior change for forced subtitle inclusion
21+
- Forced subs no longer auto-included, requires explicit `--forced-subs` flag
22+
23+
### Added
24+
25+
- **REST API Server**: Complete download management via REST API (early development)
26+
- Implemented download queue management and worker system
27+
- Added OpenAPI/Swagger documentation for easy API exploration
28+
- Included download progress tracking and status endpoints
29+
- API authentication and comprehensive error handling
30+
- Updated core components to support API integration
31+
- Early development work with more changes planned
32+
- **CustomRemoteCDM**: Highly configurable custom CDM API support
33+
- Support for third-party CDM API providers with maximum configurability
34+
- Full configuration through YAML without code changes
35+
- Addresses GitHub issue #26 for flexible CDM integration
36+
- **WindscribeVPN Proxy Provider**: New VPN provider support
37+
- Added WindscribeVPN following NordVPN and SurfsharkVPN patterns
38+
- Fixes GitHub issue #29
39+
- **Latest Episode Download**: New `--latest-episode` CLI option
40+
- `-le, --latest-episode` flag to download only the most recent episode
41+
- Automatically selects the single most recent episode regardless of season
42+
- Fixes GitHub issue #28
43+
- **Video Track Exclusion**: New `--no-video` CLI option
44+
- `-nv, --no-video` flag to skip downloading video tracks
45+
- Allows downloading only audio, subtitles, attachments, and chapters
46+
- Useful for audio-only or subtitle extraction workflows
47+
- Fixes GitHub issue #39
48+
- **Service-Specific Configuration Overrides**: Per-service fine-tuned control
49+
- Support for per-service configuration overrides in YAML
50+
- Fine-tuned control of downloader and command options per service
51+
- Fixes GitHub issue #13
52+
- **Comprehensive JSON Debug Logging**: Structured logging for troubleshooting
53+
- Binary toggle via `--debug` flag or `debug: true` in config
54+
- JSON Lines (.jsonl) format for easy parsing and analysis
55+
- Comprehensive logging of all operations (session info, CLI params, CDM details, auth status, title/track metadata, DRM operations, vault queries)
56+
- Configurable key logging via `debug_keys` option with smart redaction
57+
- Error logging for all critical operations
58+
- Removed old text logging system
59+
- **curl_cffi Retry Handler**: Enhanced session reliability
60+
- Added automatic retry mechanism to curl_cffi Session
61+
- Improved download reliability with configurable retries
62+
- **Simkl API Configuration**: New API key support
63+
- Added `simkl_client_id` configuration option
64+
- Simkl now requires client_id from https://simkl.com/settings/developer/
65+
- **Custom Session Fingerprints**: Enhanced browser impersonation capabilities
66+
- Added custom fingerprint and preset support for better service compatibility
67+
- Configurable fingerprint presets for different device types
68+
- Improved success rate with services using advanced bot detection
69+
- **TMDB and Simkl Metadata Caching**: Enhanced title cache system
70+
- Added metadata caching to title cache to reduce API calls
71+
- Caches movie/show metadata alongside title information
72+
- Improves performance for repeated title lookups and reduces API rate limiting
73+
- **API Enhancements**: Improved REST API functionality
74+
- Added default parameter handling for better request processing
75+
- Added URL field to services endpoint response for easier service identification
76+
- Complete API enhancements for production readiness
77+
- Improved error responses with better detail and debugging information
78+
79+
### Changed
80+
81+
- **Binary Search Enhancement**: Improved binary discovery
82+
- Refactored to search for binaries in root of binary folder or subfolder named after the binary
83+
- Better organization of binary dependencies
84+
- **Type Annotations**: Modernized to PEP 604 syntax
85+
- Updated session.py type annotations to use modern Python syntax
86+
- Improved code readability and type checking
87+
88+
### Fixed
89+
90+
- **Audio Description Track Support**: Added option to download audio description tracks
91+
- Added `--audio-description/-ad` flag to optionally include descriptive audio tracks
92+
- Previously, audio description tracks were always filtered out
93+
- Users can now choose to download AD tracks when needed
94+
- Fixes GitHub issue #33
95+
- **Config Directory Support**: Cross-platform user config directory support
96+
- Fixed config loading to properly support user config directories across all platforms
97+
- Fixes GitHub issue #23
98+
- **HYBRID Mode Validation**: Pre-download validation for hybrid processing
99+
- Added validation to check both HDR10 and DV tracks are available before download
100+
- Prevents wasted downloads when hybrid processing would fail
101+
- **TMDB/Simkl API Keys**: Graceful handling of missing API keys
102+
- Improved error handling when TMDB or Simkl API keys are not configured
103+
- Better user messaging for API configuration requirements
104+
- **Forced Subtitles Behavior**: Correct forced subtitle filtering
105+
- Fixed forced subtitles being incorrectly included without `--forced-subs` flag
106+
- Forced subs now only included when explicitly requested
107+
- **Font Attachment Constructor**: Fixed ASS/SSA font attachment
108+
- Use keyword arguments for Attachment constructor in font attachment
109+
- Fixes "Invalid URL: No scheme supplied" error
110+
- Fixes GitHub issue #24
111+
- **Binary Subdirectory Checking**: Enhanced binary location discovery (by @TPD94, PR #19)
112+
- Updated binaries.py to check subdirectories in binaries folders named after the binary
113+
- Improved binary detection and loading
114+
- **HLS Manifest Processing**: Minor HLS parser fix (by @TPD94, PR #19)
115+
- **lxml and pyplayready**: Updated dependencies (by @Sp5rky)
116+
- Updated lxml constraint and pyplayready import path for compatibility
117+
- **DASH Segment Calculation**: Corrected segment handling
118+
- Fixed segment count calculation for DASH manifests with startNumber=0
119+
- Ensures accurate segment processing for all DASH manifest configurations
120+
- Prevents off-by-one errors in segment downloads
121+
- **HDR Detection and Naming**: Comprehensive HDR format support
122+
- Improved HDR detection with comprehensive transfer characteristics checks
123+
- Added hybrid DV+HDR10 support for accurate file naming
124+
- Better identification of HDR formats across different streaming services
125+
- More accurate HDR/DV detection in filename generation
126+
- **Subtitle Processing**: VTT subtitle handling improvements
127+
- Resolved SDH (Subtitles for Deaf and Hard of hearing) stripping crash when processing VTT files
128+
- More robust subtitle processing pipeline with better error handling
129+
- Fixes crashes when filtering specific VTT subtitle formats
130+
- **DRM Processing**: Enhanced encoding handling
131+
- Added explicit UTF-8 encoding to mp4decrypt subprocess calls
132+
- Prevents encoding issues on systems with non-UTF-8 default encodings
133+
- Improves cross-platform compatibility for Windows and some Linux configurations
134+
- **Session Fingerprints**: Updated OkHttp presets
135+
- Updated OkHttp fingerprint presets for better Android TV compatibility
136+
- Improved success rate with services using fingerprint-based detection
137+
138+
### Documentation
139+
140+
- **GitHub Issue Templates**: Enhanced issue reporting
141+
- Improved bug report template with better structure and required fields
142+
- Enhanced feature request template for clearer specifications
143+
- Added helpful guidance for contributors to provide complete information
144+
145+
### Refactored
146+
147+
- **Import Cleanup**: Removed unused imports
148+
- Removed unused mypy import from binaries.py
149+
- Fixed import ordering in API download_manager and handlers
150+
151+
### Contributors
152+
153+
This release includes contributions from:
154+
155+
- @Sp5rky - REST API server implementation, dependency updates
156+
- @stabbedbybrick - curl_cffi retry handler (PR #31)
157+
- @stabbedbybrick - n_m3u8dl-re refactor (PR #38)
158+
- @TPD94 - Binary search enhancements, manifest parser fixes (PR #19)
159+
- @scene (Andy) - Core features, configuration system, bug fixes
160+
8161
## [1.4.8] - 2025-10-08
9162

10163
### Added
@@ -179,7 +332,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
179332

180333
### Fixed
181334

182-
- **Matroska Tag Compliance**: Enhanced media container compatibility
335+
- **Matroska Tag Compliance**: Enhanced media container compatibility
183336
- Fixed Matroska tag compliance with official specification
184337
- **Application Branding**: Cleaned up version display
185338
- Removed old devine version reference from banner to avoid developer confusion

CONFIG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,12 @@ Configuration data for pywidevine's serve functionality run through unshackle.
547547
This effectively allows you to run `unshackle serve` to start serving pywidevine Serve-compliant CDMs right from your
548548
local widevine device files.
549549

550+
- `api_secret` - Secret key for REST API authentication. When set, enables the REST API server alongside the CDM serve functionality. This key is required for authenticating API requests.
551+
550552
For example,
551553

552554
```yaml
555+
api_secret: "your-secret-key-here"
553556
users:
554557
secret_key_for_jane: # 32bit hex recommended, case-sensitive
555558
devices: # list of allowed devices for this user

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "unshackle"
7-
version = "1.4.8"
7+
version = "2.0.0"
88
description = "Modular Movie, TV, and Music Archival Software."
99
authors = [{ name = "unshackle team" }]
1010
requires-python = ">=3.10,<3.13"
@@ -31,6 +31,7 @@ dependencies = [
3131
"click>=8.1.8,<9",
3232
"construct>=2.8.8,<3",
3333
"crccheck>=1.3.0,<2",
34+
"fonttools>=4.0.0,<5",
3435
"jsonpickle>=3.0.4,<4",
3536
"langcodes>=3.4.0,<4",
3637
"lxml>=5.2.1,<7",
@@ -44,7 +45,7 @@ dependencies = [
4445
"pymysql>=1.1.0,<2",
4546
"pywidevine[serve]>=1.8.0,<2",
4647
"PyYAML>=6.0.1,<7",
47-
"requests[socks]>=2.31.0,<3",
48+
"requests[socks]>=2.32.5,<3",
4849
"rich>=13.7.1,<14",
4950
"rlaphoenix.m3u8>=3.4.0,<4",
5051
"ruamel.yaml>=0.18.6,<0.19",
@@ -58,7 +59,9 @@ dependencies = [
5859
"httpx>=0.28.1,<0.29",
5960
"cryptography>=45.0.0",
6061
"subby",
62+
"aiohttp-swagger3>=0.9.0,<1",
6163
"pysubs2>=1.7.0,<2",
64+
"PyExecJS>=1.5.1,<2",
6265
]
6366

6467
[project.urls]

0 commit comments

Comments
 (0)