From 5ec74f8abe477154a53162a542f5f27022f075ba Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 31 Mar 2020 10:28:04 -0400 Subject: [PATCH] ffmpeg file analysis returns duration as integer now --- lbry/file_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/file_analysis.py b/lbry/file_analysis.py index 7e083991c..3ae8b7dc8 100644 --- a/lbry/file_analysis.py +++ b/lbry/file_analysis.py @@ -354,7 +354,7 @@ class VideoFileAnalyzer: def _build_spec(scan_data): assert scan_data - duration = float(scan_data["format"]["duration"]) # existence verified when scan_data made + duration = int(scan_data["format"]["duration"]) # existence verified when scan_data made width = -1 height = -1 for stream in scan_data["streams"]: @@ -363,7 +363,7 @@ class VideoFileAnalyzer: width = max(width, int(stream["width"])) height = max(height, int(stream["height"])) - log.debug(" Detected duration: %f sec. with resolution: %d x %d", duration, width, height) + log.debug(" Detected duration: %d sec. with resolution: %d x %d", duration, width, height) spec = {"duration": duration} if height >= 0: