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
This commit is contained in:
Andy
2026-02-25 11:11:41 -07:00
parent 21f0186ebf
commit 42d6ef5765

View File

@@ -191,6 +191,9 @@ def build_download_args(
args["--skip-merge"] = skip_merge
if ad_keyword:
args["--ad-keyword"] = ad_keyword
# Disable segment count validation to work around N_m3u8DL-RE's Math.Ceiling
# bug in duration-based SegmentTemplate calculation (see nilaoda/N_m3u8DL-RE#108)
args["--check-segments-count"] = False
key_args = []
if content_keys: