From 6f22f6a59f616f6fd6b67a3aaf5011bec57e1f28 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 31 Mar 2020 10:57:37 -0400 Subject: [PATCH] use ceil() on duration float() instead of int() directly --- lbry/file_analysis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbry/file_analysis.py b/lbry/file_analysis.py index 3ae8b7dc8..21dd8df61 100644 --- a/lbry/file_analysis.py +++ b/lbry/file_analysis.py @@ -8,6 +8,7 @@ import re import shlex import shutil import subprocess +from math import ceil import lbry.utils from lbry.conf import TranscodeConfig @@ -354,7 +355,7 @@ class VideoFileAnalyzer: def _build_spec(scan_data): assert scan_data - duration = int(scan_data["format"]["duration"]) # existence verified when scan_data made + duration = ceil(float(scan_data["format"]["duration"])) # existence verified when scan_data made width = -1 height = -1 for stream in scan_data["streams"]: