From d4b620bbff1380fd6069e9c274cde995c6e778db Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 15 Oct 2026 08:31:39 +0000 Subject: [PATCH] Keep the capture difference warning for captures with ad breaks The warning compared the file's container duration with its video track. On captures with ad breaks that difference only came from the embedded chapters running past the shortened video. Now that chapters use video offsets, and padded captures are as long as the stream, it no longer showed, so users weren't told that segments are missing. Count the recorded stream pauses in the same difference and show the captured content length (excluding black filler) as the video duration. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XuPs3nkTaDwZGoCD8oKKEV --- client-vue/src/components/vod/VodItemVideoInfo.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client-vue/src/components/vod/VodItemVideoInfo.vue b/client-vue/src/components/vod/VodItemVideoInfo.vue index f7228c2f..7d8574c1 100644 --- a/client-vue/src/components/vod/VodItemVideoInfo.vue +++ b/client-vue/src/components/vod/VodItemVideoInfo.vue @@ -102,9 +102,9 @@ > {{ t("vod.video-info.duration-difference", { - full: humanDuration(vod.video_metadata?.full_duration || 0), + full: humanDuration((vod.video_metadata?.duration || 0) + (vod.stream_pauses_padded ? 0 : fileAndVideoDurationDifference)), diff: humanDuration(fileAndVideoDurationDifference), - dur: humanDuration(vod.video_metadata?.duration || 0), + dur: humanDuration((vod.video_metadata?.duration || 0) - (vod.stream_pauses_padded ? fileAndVideoDurationDifference : 0)), }) }} @@ -311,7 +311,8 @@ const { t } = useI18n(); const fileAndVideoDurationDifference = computed((): number | null => { if (!props.vod.video_metadata || !props.vod.video_metadata.full_duration) return null; - return props.vod.video_metadata.full_duration - props.vod.video_metadata.duration; + // ad breaks cut out of the capture (or filled with black) don't show up in the file durations, count the recorded stream pauses too + return Math.max(props.vod.video_metadata.full_duration - props.vod.video_metadata.duration, props.vod.totalPausedTime / 1000); }); const videoAndTwitchDurationDifference = computed((): number | null => {