Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions client-vue/src/components/vod/VodItemVideoInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
})
}}
</div>
Expand Down Expand Up @@ -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 => {
Expand Down
Loading