mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-10 08:29:00 +00:00
fix(hybrid): skip bitrate filter for DV tracks in HYBRID mode
This commit is contained in:
@@ -1392,6 +1392,16 @@ class dl:
|
|||||||
self.log.warning(f"Skipping {color_range.name} video tracks as none are available.")
|
self.log.warning(f"Skipping {color_range.name} video tracks as none are available.")
|
||||||
|
|
||||||
if vbitrate:
|
if vbitrate:
|
||||||
|
if any(r == Video.Range.HYBRID for r in range_):
|
||||||
|
# In HYBRID mode, only apply bitrate filter to non-DV tracks
|
||||||
|
# DV tracks are kept regardless since they're only used for RPU metadata
|
||||||
|
title.tracks.select_video(
|
||||||
|
lambda x: x.range == Video.Range.DV or (x.bitrate and x.bitrate // 1000 == vbitrate)
|
||||||
|
)
|
||||||
|
if not any(x.range != Video.Range.DV for x in title.tracks.videos):
|
||||||
|
self.log.error(f"There's no {vbitrate}kbps Video Track...")
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
title.tracks.select_video(lambda x: x.bitrate and x.bitrate // 1000 == vbitrate)
|
title.tracks.select_video(lambda x: x.bitrate and x.bitrate // 1000 == vbitrate)
|
||||||
if not title.tracks.videos:
|
if not title.tracks.videos:
|
||||||
self.log.error(f"There's no {vbitrate}kbps Video Track...")
|
self.log.error(f"There's no {vbitrate}kbps Video Track...")
|
||||||
|
|||||||
Reference in New Issue
Block a user