Display total VOD duration from provider metadata and stream probes

Adapted from MikaelKW/nodecast-tv-plus commit 9c6416cdba40813d44d21c8d76e31e4d9ab3155f.

Co-authored-by: Mikael <mikaelkwessel@gmail.com>
This commit is contained in:
Technomancer702
2026-10-12 16:42:23 -07:00
parent bd8365efc8
commit 2999d6542f
8 changed files with 165 additions and 9 deletions

View File

@ -133,6 +133,8 @@ function analyzeProbeResult(probeResult, url) {
return {
video: videoCodec,
audio: audioCodec,
duration: Number.isFinite(Number(format.duration)) && Number(format.duration) > 0
? Number(format.duration) : 0,
audioCodecs: streams.filter(s => s.codec_type === 'audio')
.map(s => s.codec_name?.toLowerCase() || 'unknown'),
width: videoStream?.width || 0,