X-Git-Url: https://git.distorted.org.uk/~mdw/autoys/blobdiff_plain/608b936e9f7b5ffe05988bde66af1fb1c6acf239..00beb9e518942f3a4415498281a8d66639735274:/gremlin/gremlin.in diff --git a/gremlin/gremlin.in b/gremlin/gremlin.in index 84429b7..cca2789 100644 --- a/gremlin/gremlin.in +++ b/gremlin/gremlin.in @@ -41,7 +41,7 @@ import shutil as SH import optparse as OP import threading as TH import shlex as L -from math import sqrt +from math import sqrt, ceil from contextlib import contextmanager ## eyeD3 tag fettling. @@ -247,7 +247,7 @@ class ProgressEyecandy (object): ## Work out -- well, guess -- the time remaining. if cur: t = T.time() - eta = me._fmt_time((t - me._start)*(max - cur)/cur) + eta = me._fmt_time(ceil((t - me._start)*(max - cur)/cur)) else: eta = '???' @@ -1107,8 +1107,8 @@ class OggVorbisFormat (AudioFormat): for q, br in me.QMAP: if br >= me.bitrate: break - else: - raise ValueError, 'no suitable quality setting found' + else: + raise ValueError, 'no suitable quality setting found' encprops['quality'] = q/10.0 return [make_element('vorbisenc', **encprops), make_element('oggmux')]