Commit Graph

436 Commits

Author SHA1 Message Date
Sp5rky
31f8532131 Merge pull request #83 from CodeName393/service.py
Improve service.py
2026-02-26 08:07:05 -07:00
Sp5rky
8d05a8ceb8 Merge pull request #79 from CodeName393/select-title-update
Select title update
2026-02-26 08:02:31 -07:00
CodeName393
c5ef13df5d Update selector.py 2026-02-26 15:25:09 +09:00
CodeName393
1611fcc971 Update dl.py 2026-02-26 15:18:41 +09:00
CodeName393
0f25b0ce52 Update selector.py 2026-02-26 15:18:21 +09:00
CodeName393
00b4f2cdd1 Update selector.py 2026-02-26 15:16:34 +09:00
CodeName393
65e6ae88d0 Update dl.py 2026-02-26 15:16:22 +09:00
Andy
820db5f179 refactor(providers): extract metadata providers into modular system
- Create `unshackle/core/providers/` package with abstract base class, IMDBApi (free, no key), SIMKL, and TMDB provider implementations
- Add consensus-based ID enrichment: cross-references IMDB IDs with TMDB and SIMKL, drops all data from providers that disagree on tmdb_id (likely resolved to wrong title)
- Cache enriched IDs alongside raw provider data so they survive cache round-trips
- Genericize TitleCacher with `cache_provider()`/`get_cached_provider()` replacing provider-specific methods; respect `--no-cache` flag
- Add `--imdb` CLI flag to dl command for direct IMDB ID lookup
2026-02-25 19:02:18 -07:00
Andy
42d6ef5765 fix(n_m3u8dl_re): disable segment count validation for duration-based DASH
N_m3u8DL-RE uses Math.Ceiling to calculate segment counts from SegmentTemplate @duration, which overshoots by 1 when the division has a small fractional remainder. This causes 404 on the phantom last segment and fails with "Segment count check not pass".

Upstream bug: nilaoda/N_m3u8DL-RE#108
2026-02-25 11:11:41 -07:00
CodeName393
b26d47fd9b Update dl.py 2026-02-25 19:27:13 +09:00
CodeName393
772bacfc8f Update selector.py 2026-02-25 19:26:35 +09:00
CodeName393
d261b4715d Fix 2026-02-25 19:22:59 +09:00
CodeName393
05dc682a2d Merge branch 'dev' into service.py 2026-02-25 19:21:22 +09:00
CodeName393
86d464dc8e Fix 2026-02-25 19:19:56 +09:00
CodeName393
20bc7d2dba Fix 2026-02-25 19:18:01 +09:00
CodeName393
b1d28d3229 Fix 2026-02-25 19:17:11 +09:00
Andy
21f0186ebf feat(dl): add --output option to override download directory 2026-02-25 00:12:24 -07:00
Andy
86a7a95b6f docs: update and correct configuration documentation 2026-02-24 23:50:33 -07:00
Andy
d3fb0b6b24 refactor(example): migrate EXAMPLE service to track_request pattern 2026-02-24 13:29:10 -07:00
Andy
34f4d6bff7 fix(track): fallback to requests downloader from n_m3u8dl_re for unsupported track types 2026-02-24 12:57:46 -07:00
CodeName393
eefb6fcad7 Fix 2026-02-25 01:44:33 +09:00
CodeName393
c78a649170 Fix 2 2026-02-25 01:34:58 +09:00
CodeName393
c01e3993ce Fix 1 2026-02-25 01:34:24 +09:00
CodeName393
eba9f846b0 Improve service.py
Fix the issue of missing the get_playready_license service helper function on service.py
2026-02-25 00:44:04 +09:00
Andy
b11b23e529 chore(release): bump version to 3.1.0 2026-02-23 16:27:05 -07:00
Andy
19341e2569 refactor(dl): remove legacy multi-fetch loop for unmigrated services 2026-02-23 16:21:54 -07:00
Andy
d0341f6844 feat(core): add TrackRequest system for multi-codec/multi-range support
Add TrackRequest dataclass to Service base class that centralizes CLI vcodec/range/best_available params. Services read from self.track_request instead of accessing ctx.parent.params directly.

- Add TrackRequest dataclass with codecs, ranges, best_available fields
- Set self.track_request in Service.__init__() from CLI params
- Add _get_tracks_for_variants() helper for per-codec/range API calls
- Update dl.py to detect migrated vs legacy services automatically
- Handle HYBRID+other ranges (e.g. -r HYBRID,SDR) correctly in dl.py
- Support --best-available with multi-range/codec (skip unavailable)
2026-02-23 15:47:27 -07:00
Andy
983fd18d53 fix(session): reduce default max_retries from 10 to 5 for CurlSession
fix(service): reduce max_retries from 15 to 5 for HTTPAdapter
2026-02-23 12:59:07 -07: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
e7120bd063 fix(attachment): sanitize filenames with illegal Windows characters 2026-02-17 16:02:59 -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
c10257b8dc Revert "feat(debug): add JSONL debug logging to decryption, muxing, and all downloaders"
This reverts commit cc89f4ca93.
2026-02-17 14:37:50 -07:00
Andy
cc89f4ca93 feat(debug): add JSONL debug logging to decryption, muxing, and all downloaders
Expand debug logging coverage for better diagnostics when investigating download/decryption issues like QUICKTIME/cbcs problem.
2026-02-17 13:58:36 -07:00
CodeName393
d2f221f3fc Restore code comments 2026-02-18 03:36:54 +09:00
CodeName393
57ecddfeeb Delete terminal reset logic 2026-02-18 03:27:35 +09:00
CodeName393
d21a59f306 dl.py Update 2026-02-18 02:43:58 +09:00
CodeName393
b9bf8fddf5 Selector Update 2026-02-18 02:41:00 +09:00
Andy
0217086abf style: fix ruff E721, E701, and E722 lint errors 2026-02-16 13:37:23 -07:00
Andy
df92f9e4b6 refactor(hybrid): replace log.info with console status and add JSONL debug logging 2026-02-16 13:33:11 -07:00
Andy
9ed56709cd Merge branch 'dev' of https://github.com/unshackle-dl/unshackle into dev 2026-02-15 17:38:52 -07:00
Andy
f96f1f9a95 feat(hybrid): add L5 active area and dynamic L6 luminance metadata
Add crop detection via ffmpeg to generate Level 5 active area metadata, resolving DV/HDR10 black bar mismatches. Update Level 6 to extract actual luminance values from the RPU instead of hardcoding defaults.
2026-02-15 17:38:43 -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
cee7d9a75f fix(n_m3u8dl_re): pass all content keys for DualKey DRM decryption 2026-02-15 13:37:49 -07:00
Andy
bf9087a1ce chore(release): bump version to 3.0.0
BREAKING CHANGE: PlayReady users without explicit playready_devices no longer get access to all devices by default.

Key changes:
- feat(drm): add MonaLisa DRM support to core infrastructure
- feat(cdm): add remote PlayReady CDM support via pyplayready RemoteCdm
- feat(serve): add PlayReady CDM support alongside Widevine
- feat(gluetun): Gluetun VPN integration and Windscribe support
- feat(audio): codec lists and split muxing
- feat(tracks): prioritize Atmos audio tracks over higher bitrate non-Atmos
- feat(video): detect interlaced scan type from MPD manifests
- feat(cdm): normalize CDM detection for local and remote implementations
- fix(serve)!: make PlayReady users config consistently a mapping
- 50+ additional bug fixes across HLS/DASH, proxies, subtitles, and more
3.0.0
2026-02-15 13:04:42 -07:00
Andy
23cc351f77 feat(tracks): prioritize Atmos audio tracks over higher bitrate non-Atmos 2026-02-15 12:08:27 -07:00