mirror of
https://github.com/NohamR/OqeeRewind.git
synced 2026-07-11 22:41:14 +00:00
Chunked decryption, resume & selection fixes
Implement chunked decryption of .m4s segments (avoid loading entire stream into memory) by changing decrypt() to accept a segment directory, process ~1GB chunks with mp4ff-decrypt, and concatenate results. Add resume support in segment downloader by skipping already downloaded .m4s files and initializing successful counter accordingly. Improve manifest handling: gracefully handle missing AVC/HEVC tracks, bruteforce ticks conditionally, and mark representations for removal when no valid tick is found. Add fallback unfiltered selection in select_track when filtered lookup yields no candidates. Replace naive UTC offset logic with explicit Europe/Paris timezone utilities and adjust related time conversion signatures. Bump project version to 1.0.
This commit is contained in:
@@ -439,8 +439,16 @@ def select_track(content_dict, quality_spec, content_type):
|
||||
candidates.extend(tracks)
|
||||
|
||||
if not candidates:
|
||||
logger.warning("No %s track found for '%s'.", content_type, quality_spec)
|
||||
return None
|
||||
if filter_part:
|
||||
logger.warning(
|
||||
"No %s track found for '%s'. Falling back to unfiltered selection.",
|
||||
content_type, quality_spec
|
||||
)
|
||||
for key, tracks in content_dict.items():
|
||||
candidates.extend(tracks)
|
||||
if not candidates:
|
||||
logger.warning("No %s track found for '%s'.", content_type, quality_spec)
|
||||
return None
|
||||
|
||||
if pref == "best":
|
||||
selected = max(candidates, key=lambda x: x["bandwidth"])
|
||||
|
||||
Reference in New Issue
Block a user