From c397f9a418cb403185845d83fbfa3b3026fa7fcb Mon Sep 17 00:00:00 2001 From: Taeyeon Mori Date: Mon, 13 Nov 2017 18:53:57 +0900 Subject: [PATCH] xconv: Why does integer division return a float >.< --- lib/python/xconv/profiles/audiobook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/xconv/profiles/audiobook.py b/lib/python/xconv/profiles/audiobook.py index e5c0736..4486e6b 100644 --- a/lib/python/xconv/profiles/audiobook.py +++ b/lib/python/xconv/profiles/audiobook.py @@ -142,7 +142,7 @@ def explode(task, stream, defines): min_intv = float(defines.get("minimum", 5)) * 60 last_duration = stream.duration % interval - npieces = (stream.duration // interval) + (1 if last_duration > min_intv else 0) + npieces = int(stream.duration // interval) + (1 if last_duration > min_intv else 0) ext = "ogg" if "ogg" in defines else "opus"