From 1d750d42046bb4bba85d37c8d54b4aca08d3a237 Mon Sep 17 00:00:00 2001 From: Jonathan Baecker Date: Wed, 19 Jun 2019 16:11:30 +0200 Subject: [PATCH] float instead of integer --- ffplayout.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ffplayout.py b/ffplayout.py index cddf2a4b..f2161bf0 100755 --- a/ffplayout.py +++ b/ffplayout.py @@ -94,7 +94,7 @@ _playlist = SimpleNamespace( start=0, filler=cfg.get('PLAYLIST', 'filler_clip'), blackclip=cfg.get('PLAYLIST', 'blackclip'), - shift=cfg.getint('PLAYLIST', 'time_shift'), + shift=cfg.getfloat('PLAYLIST', 'time_shift'), map_ext=json.loads(cfg.get('PLAYLIST', 'map_extension')) ) @@ -266,9 +266,8 @@ def get_time(time_format): if time_format == 'hour': return t.hour elif time_format == 'full_sec': - sec = float(t.hour * 3600 + t.minute * 60 + t.second) - micro = float(t.microsecond) / 1000000 - return sec + micro + return t.hour * 3600 + t.minute * 60 + t.second \ + + t.microsecond / 1000000 elif time_format == 'stamp': return float(datetime.now().timestamp()) else: