forked from LBRYCommunity/lbry-sdk
use ceil() on duration float() instead of int() directly
This commit is contained in:
parent
5ec74f8abe
commit
6f22f6a59f
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import re
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from math import ceil
|
||||||
|
|
||||||
import lbry.utils
|
import lbry.utils
|
||||||
from lbry.conf import TranscodeConfig
|
from lbry.conf import TranscodeConfig
|
||||||
|
@ -354,7 +355,7 @@ class VideoFileAnalyzer:
|
||||||
def _build_spec(scan_data):
|
def _build_spec(scan_data):
|
||||||
assert 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
|
width = -1
|
||||||
height = -1
|
height = -1
|
||||||
for stream in scan_data["streams"]:
|
for stream in scan_data["streams"]:
|
||||||
|
|
Loading…
Reference in a new issue