Commit Graph

150 Commits

Author SHA1 Message Date
73700f3228 merge upstream 2025-09-03 10:27:04 +00:00
Andy
86bb162868 feat(tags): Enhance tag handling for TV shows and movies from Simkl data
Fixes #15
2025-09-02 22:01:44 +00:00
Andy
501cfd68e8 fix(cdm): Add error message for missing service certificate in CDM session 2025-09-02 19:16:34 +00:00
Andy
76fb2eea95 feat: implement intelligent caching system for CDM license requests 2025-09-02 18:48:34 +00:00
Andy
ea5ec40bcd Merge branch 'main' of https://github.com/unshackle-dl/unshackle 2025-09-02 17:34:12 +00:00
Andy
329850b043 feat(cdm): Enhance key retrieval logic and improve cached keys handling 2025-09-02 17:33:31 +00:00
Andy
73595f3b50 feat(cdm): Enhance key retrieval logic and improve cached keys handling 2025-09-02 17:23:02 +00:00
b4cefa6597 fix(dl): increase upper tolerance for video bitrate selection
- Changed max_bitrate from vbitrate + 100 to vbitrate + 200
- Updated video track selection to use the new max_bitrate range
- Ensured better matching of video tracks within adjusted bitrate tolerance
- Improved error logging message for bitrate selection range
2025-09-02 13:47:51 +07:00
cea302afae Merge pull request 'Update Unshackle' (#1) from update-unshackle into main
Reviewed-on: http://mac:3002/unshackle-dl/unshackle/pulls/1
2025-09-02 06:07:53 +00:00
59a1691ac4 Sync Update from origin repo 2025-09-02 13:05:28 +07:00
93ef794412 refactor(Netflix): extract track hydration logic into separate method
- Moved hydration of unavailable audio and subtitle tracks into hydrate_all_tracks method
- Replaced large inline hydration code with a single call to hydrate_all_tracks
- Improved clarity by encapsulating hydration steps including logging and error handling
- Maintained original behavior with detailed debug and warning messages
- Added comprehensive parameters to hydrate_all_tracks for audio, subtitle, primary tracks, and language context
- Ensured hydration method returns complete Tracks object for easier track management and addition
2025-09-02 12:30:54 +07:00
Andy
1e82283133 fix(tags): Fix import order. 2025-09-02 04:13:43 +00:00
Andy
ab13dde9d2 feat(changelog): Update changelog for version 1.4.4 with enhanced CDM support, configuration options, and various improvements 2025-09-02 04:10:28 +00:00
Andy
9fd0895128 feat(cdm): Refactor DecryptLabsRemoteCDM full support for Widevine/Playready and ChromeCDM 2025-09-02 04:02:52 +00:00
0cf2367781 refactor(Netflix): improve audio and subtitle track hydration logic
- Add primary audio track storage for subtitle-only hydration cases
- Introduce helper methods for track validation, empty track tuple, and logging hydration attempts
- Enhance hydration loop to reuse last successful or primary audio tracks for context
- Log detailed hydration attempt information including track IDs and request types
- Use None in API calls instead of 'N/A' for missing tracks to prevent errors
- Comment out debug log for video profiles to reduce noise
- Simplify handling of mismatched audio and subtitle hydration lengths with improved track fallback logic
2025-09-02 04:11:53 +07:00
Andy
ed744205ad fix(tags): 🐛 Fix Matroska tag compliance with official specification
- Update IMDB tags to use ID only (tt123456) instead of URLs
  - Update TMDB tags to use prefix/id format (movie/123456, tv/123456)
  - Update TVDB tags to use numeric ID only
  - Add XML escaping for tag values
  - Fix XML declaration to use double quotes

Fixes #15
2025-09-01 21:02:08 +00:00
Andy
3ef43afeed feat(cdm): Add DecryptLabs CDM configurations for Chrome and PlayReady devices with updated User-Agent and service certificate 2025-09-01 00:34:07 +00:00
Andy
26851cbe7c feat(cdm): Enhance DecryptLabsRemoteCDM with improved session management and caching support and better support for remote WV/PR 2025-09-01 00:31:00 +00:00
ae3f896348 refactor(titles): comment out config.tag suffix in episode name generation
- Disabled appending of config.tag to episode name by commenting out related lines
- Preserved existing logic for codec and HFR suffix additions
- Ensured filename sanitization remains unchanged
2025-08-30 14:10:31 +07:00
0d2237d09a fix(Netflix): correct video range and codec validation logic
- Adjust condition order in video range and codec compatibility check
- Change range membership check from object to name string in profile loop
- Remove redundant error logging and sys.exit call in profile handling
- Improve consistency of video profile retrieval based on codec and range
2025-08-30 11:37:31 +07:00
33ceed0016 fix(proxy_providers): update SurfsharkVPN service credentials
- Changed username for SurfsharkVPN in unshackle.yaml
- Changed password for SurfsharkVPN in unshackle.yaml
2025-08-30 11:37:16 +07:00
bb85ac2767 fix(dl): add bitrate tolerance for video track selection
- Implement bitrate selection with a tolerance of +100 kbps and -800 kbps
- Ensure minimum bitrate does not go below 0 when calculating lower bound
- Update error message to reflect bitrate range instead of exact value
- Enhance logging for cases with no matching video tracks within tolerance range
2025-08-30 01:14:34 +07:00
c7be94c0fc chore(config): add Netflix credentials and comment out wvds directory
- Added Netflix service credentials with a default user and password
- Commented out the wvds directory in the configuration file
- Retained example credentials for reference in comments
2025-08-29 20:54:34 +07:00
c60035cb1d feat(netflix): add hybrid HDR10 and DV profile support and Android CDM improvements
- Introduce new descriptive subtitle option in CLI and internal logic
- Support hybrid video range by separately fetching HDR10 and DV profiles
- Add detailed error handling and logging for hybrid mode processing
- Extend ESN handling to support different device types (Chrome and Android)
- Implement Android CDM login using email and password credentials
- Update ESN caching logic with type-aware expiration handling
- Adjust manifest parsing to handle optional hydrate_tracks parameter
- Enhance subtitle filtering to optionally skip descriptive subtitles
- Expand ALIASES to include lowercase variants "netflix" and "nf"
- Add new ESN mapping entry for Android device in config.yaml
2025-08-29 20:53:52 +07:00
3c24d83293 refactor(msl): improve key exchange handling and code cleanup
- Replace commented Widevine key exchange code with active parsing and key extraction
- Add checks for CDM session and CDM availability before license parsing
- Update key permission strings to lowercase and align with key extraction logic
- Handle AsymmetricWrapped scheme separately with RSA decryption of keys
- Change EntityAuthentication to Unauthenticated for certain challenge cases
- Remove redundant jsonpickle encoding/decoding for cached keys, store raw data instead
- Add detailed logging for key UUIDs and extracted Widevine keys
- Fix key comparison by converting kid bytes to UUID on comparison
- Raise Exception instead of using logger exit on MSL response error
- Update imports to consolidate pywidevine package classes used
2025-08-29 20:52:30 +07:00
Andy
b4efdf3f2c feat(cdm): Enhance DecryptLabsRemoteCDM to support cached keys and improve license handling 2025-08-28 17:09:55 +00:00
fcd1ebcf83 fix(netflix): improve audio and subtitle track hydration logic
- Update joc value for atmos content profile from 6 to 16
- Add informative log message summarizing total audio and subtitle tracks to hydrate
- Refactor hydration loop to handle mismatched lengths of audio and subtitle tracks more clearly
- Skip hydration if no audio tracks are available for the current index
- Ensure valid subtitle track ID is used in manifest request to avoid API errors
- Add detailed debug logs for processing hydrated audio and subtitle streams
- Handle exceptions gracefully for each stream and track hydration step with warnings
- Log when no tracks need hydration to improve observability
2025-08-28 11:25:42 +07:00
e1f69eb307 feat(netflix): add Widevine CDM integration with MSL handshake and ESN mapping
- Extend MSL handshake method to support Widevine key exchange scheme using CDM instance
- Implement CDM session handling with service certificate and license challenge during handshake
- Add exception handling for key exchange errors instead of exiting logger
- Modify Netflix service to include CDM instance and pass it to MSL handshake call
- Update get_esn method to use ESN mapping from config for security level 1 CDM systems
- Add new ESN mapping entry in config.yaml for a specific CDM SystemID
- Remove commented out Widevine key exchange placeholder code and replace with full implementation
- Include CDM initialization logs and tweak manifest params to support DRM challenges
- Ensure fallback to random ESN generation for non-level 1 security or missing cached ESN
2025-08-28 02:26:44 +07:00
d18fbdb542 fix(unshackle): update remote_cdm device configuration
- Replace chrome-2 device with android device in remote_cdm list
- Change device_name to "andorid" and device_type to ANDROID
- Update system_id to 8131 and security_level to 1
- Add type field with value "decrypt_labs"
- Update host and secret fields to match decrypt_labs credentials
2025-08-28 02:21:04 +07:00
d5cbc4e088 fix(cdm): adjust scheme value based on security level
- Change scheme to "widevine" if security level is 3, otherwise use "L1"
- Apply this logic when setting init_data and license response schemes
- Ensure correct CDM scheme usage according to security level context
2025-08-28 02:20:23 +07:00
Andy
eb30620626 fix(main): As requested old devine version removed from banner to avoid any confusion the developer of this software. Original GNU is still applys. 2025-08-26 23:16:00 +00:00
Andy
7b71d6631c fix(main): As requested old devine version removed from banner to avoid any confusion the developer of this software. Original GNU is still applys. 2025-08-26 22:49:46 +00:00
831fa10ce5 feat(dl): enhance episode folder structure and rename series folders
- Create nested folder structure for episodes: {title}/Season {season:02}/{filename}
- Keep existing folder naming for songs unchanged
- Modify episode folder naming to only show title for main folder
- Adjust episode file naming format to include separators and sanitization
- Add get_season_folder() method returning 'Season XX' for episodes
- Disable series year inclusion in folder and episode naming by default in config
- Comment out additional service and audio language tags in episode naming code
2025-08-26 21:35:22 +07:00
2a414720e7 feat(netflix): implement initial Netflix service with MSL DRM support
- Add MSL core implementation for handling Netflix message security layer
- Create MSL keys and message encryption/signature utilities
- Implement handshake to establish encrypted session keys with Netflix endpoint
- Add entity and user authentication scheme support for MSL
- Provide methods for message creation, sending, decryption, and parsing
- Implement Netflix service class with CLI integration via Click
- Support title metadata retrieval and parse movie or series accordingly
- Implement track extraction with profile and codec handling logic
- Add chapter extraction from Netflix metadata with error handling
- Implement Widevine license request using MSL messaging
- Add utility to split profiles based on video codec types
- Define schemes for key exchange, user and entity authentication with MSL
- Enable caching and loading of MSL keys with expiration checks
- Include gzip compression and base64 key decoding helpers within MSL class
2025-08-26 17:59:47 +07:00
f377bbfb74 chore(config): add comprehensive unshackle.yaml configuration file
- Define tagging options for filenames including group and metadata tags
- Configure terminal background color and file naming conventions
- Set caching parameters for title metadata with expiration controls
- Add muxing and default directories settings
- Provide flexible credentials management with profile and default support
- Configure CDM devices and remote CDMs for Widevine and PlayReady
- Define local and HTTP key vaults with options to disable pushing keys
- Set downloader preferences and specific settings for aria2c, n_m3u8dl_re, and curl_impersonate
- Introduce default parameters for download commands and subtitle conversion methods
- Add service-specific API keys, profiles, and device configurations
- Include proxy provider credentials for external VPN services
2025-08-26 17:59:21 +07:00
fb58e9f52a chore(git): update .gitignore file
- Remove unshackle.yaml from ignore list
- Delete 'services/' directory from ignore list
- Add 'Cache' to ignore list at the end of the file
2025-08-26 17:58:56 +07:00
4d2e84a45a fix(movie): adjust naming format and comment out audio and service tags
- Append " -" suffix to the movie name after replacing "$" with "S"
- Comment out adding service name to the title
- Disable appending "WEB-DL" tag to the title
- Comment out adding "DUAL" tag for two audio languages
- Comment out adding "MULTi" tag for more than two audio languages
- Comment out appending config tag suffix to video codec in name
2025-08-26 17:58:44 +07:00
f85ddce6f2 feat(downloaders): improve aria2c download progress reporting
- Added RPC calls to get detailed global and active download statistics
- Calculated total downloaded size, content size, and active download speed from active downloads
- Included stopped downloads in totals and handle error states with logged messages
- Yielded enhanced progress updates with combined downloaded sizes and speeds
- Added more granular progress dictionary keys for richer status reporting
- Added sleep delay in main aria2c function to reduce CPU usage during monitoring loop
- Updated docstring examples to reflect new progress data format and keys
2025-08-26 17:58:23 +07:00
354ba6c2e3 fix(core): correct filename sanitization regex and cleanup
- Adjust regex to replace semicolon only with spacer
- Remove colon from characters replaced by spacer, handle as removal instead
- Comment out removal of extra neighbouring spacers to prevent unintended collapses
- Refine unsafe characters removal pattern to avoid filename issues
2025-08-26 17:57:53 +07:00
Andy
5949931b56 feat(config): Add new configuration options for device certificate status list and language preferences 2025-08-20 05:28:58 +00:00
Andy
ddfc0555c9 style(config): Clean up unshackle-example.yaml with correct accurate information. 2025-08-20 05:20:59 +00:00
Andy
3dda3290d3 feat(release): Bump version to 1.4.3 and update changelog with new features and improvements 2025-08-20 05:10:45 +00:00
Andy
19ff200617 refactor(drm): Simplify decrypt method by removing unused parameter and streamline logic 2025-08-20 05:10:38 +00:00
Andy
ed0f03eca3 fix(dependencies): Remove unnecessary data extra requirement from langcodes 2025-08-16 03:34:56 +00:00
Andy
72f65adcb2 feat(ip-info): Fix few more issues with the get_ip_info make sure we failover to different provider on 429 errors and allow future for more API providers to be added later. 2025-08-16 00:28:05 +00:00
Andy
50a5a23341 feat(ip-info): Add cached IP info retrieval with fallback tester to avoid rate limiting 2025-08-15 22:40:07 +00:00
Andy
e10c760821 feat(release): Bump version to 1.4.2 and update changelog with new features and fixes 1.4.2 2025-08-14 17:56:01 +00:00
Andy
990084ab1f feat(tags): Implement session management for API requests with retry logic 2025-08-14 02:14:46 +00:00
Andy
8e598f7d6a Merge branch 'main' of https://github.com/unshackle-dl/unshackle 2025-08-13 15:00:33 +00:00
Andy
06687b51fb feat(config): Add series_year option to control year inclusion in titles and YAML configuration 2025-08-13 15:00:30 +00:00