Session keys from master playlists often contain PSSHs with multiple KIDs covering all tracks, causing licensing to return keys for wrong KIDs. Changes: - Unified DRM licensing logic for all downloaders - Prefer media playlist EXT-X-KEY tags which contain track-specific KIDs - Add filter_keys_for_cdm() to select keys matching configured CDM type - Add get_track_kid_from_init() to extract KID from init segment with fallback to drm.kid from PSSH - Track initial_drm_key to prevent double-licensing on first segment - Simplify n_m3u8dl_re block to reuse common licensing flow - Use strict PlayReady keyformat matching via PR_PSSH.SYSTEM_ID URN instead of loose substring match - Fix PlayReady keyformat comparisons that incorrectly compared strings to PlayReadyCdm class - Fix byterange header format in get_track_kid_from_init() to use HLS.calculate_byte_range() Also fixes PlayReady keyformat matching in: - unshackle/core/tracks/track.py - unshackle/core/drm/playready.py Fixes download failures where track_kid was null or mismatched, causing wrong content keys to be obtained during PlayReady/Widevine licensing.
unshackle
Movie, TV, and Music Archival Software
What is unshackle?
unshackle is a fork of Devine, a powerful archival tool for downloading movies, TV shows, and music from streaming services. Built with a focus on modularity and extensibility, it provides a robust framework for content acquisition with support for DRM-protected content.
Key Features
- 🚀 Easy Installation - Simple UV installation
- 🎥 Multi-Media Support - Movies, TV episodes, and music
- 🛠️ Built-in Parsers - DASH/HLS and ISM manifest support
- 🔒 DRM Support - Widevine and PlayReady integration
- 🌈 HDR10+DV Hybrid - Hybrid Dolby Vision injection via dovi_tool
- 💾 Flexible Storage - Local and remote key vaults
- 👥 Multi-Profile Auth - Support for cookies and credentials
- 🤖 Smart Naming - Automatic P2P-style filename structure
- ⚙️ Configurable - YAML-based configuration
- ❤️ Open Source - Fully open-source with community contributions welcome
Quick Start
Installation
This installs the latest version directly from the GitHub repository:
git clone https://github.com/unshackle-dl/unshackle.git
cd unshackle
uv sync
uv run unshackle --help
Install unshackle as a global (per-user) tool
uv tool install git+https://github.com/unshackle-dl/unshackle.git
# Then run:
uvx unshackle --help # or just `unshackle` once PATH updated
Note
After installation, you may need to add the installation path to your PATH environment variable if prompted.
Recommended: Use
uv run unshackleinstead of direct command execution to ensure proper virtual environment activation.
Planned Features
- 🖥️ Web UI Access & Control - Manage and control unshackle from a modern web interface.
- 🔄 Sonarr/Radarr Interactivity - Direct integration for automated personal downloads.
- ⚙️ Better ISM Support - Improve on ISM support for multiple services
- 🔉 ATMOS - Better Atmos Support/Selection
- 🎵 Music - Cleanup Audio Tagging using the tags.py for artist/track name etc.
Basic Usage
# Check available commands
uv run unshackle --help
# Configure your settings
git clone https://github.com/unshackle-dl/unshackle.git
cd unshackle
uv sync
uv run unshackle --help
# Download content (requires configured services)
uv run unshackle dl SERVICE_NAME CONTENT_ID
Documentation
For comprehensive setup guides, configuration options, and advanced usage:
The WIKI contains detailed information on:
- Service configuration
- DRM configuration
- Advanced features and troubleshooting
For guidance on creating services, see our WIKI documentation.
End User License Agreement
unshackle and it's community pages should be treated with the same kindness as other projects. Please refrain from spam or asking for questions that infringe upon a Service's End User License Agreement.
- Do not use unshackle for any purposes of which you do not have the rights to do so.
- Do not share or request infringing content; this includes widevine Provision Keys, Content Encryption Keys, or Service API Calls or Code.
- The Core codebase is meant to stay Free and Open-Source while the Service code should be kept private.
- Do not sell any part of this project, neither alone nor as part of a bundle. If you paid for this software or received it as part of a bundle following payment, you should demand your money back immediately.
- Be kind to one another and do not single anyone out.
Licensing
This software is licensed under the terms of GNU General Public License, Version 3.0.
You can find a copy of the license in the LICENSE file in the root folder.