fix wrong calculation

This commit is contained in:
jb-alvarado 2018-02-07 09:11:17 +01:00
parent 87f5da1db5
commit 1c6f518216
2 changed files with 5 additions and 1 deletions

View File

@ -61,9 +61,12 @@ a_sample = 44100
# playlist format is smil xml
# day_start means at witch hour starts the day, as integer
# filler_path and filler_clip are for the GUI only at the moment
[PLAYLIST]
playlist_path = /playlists
clips_root = /ADtvMedia
filler_path = /ADtvMedia/ADtv/03 - Musikalische Lückenfüller
filler_clip = /ADtvMedia/ADtv/01 - Intro/seperator.clock.5-00.mp4
day_start = 6

View File

@ -313,6 +313,7 @@ def iter_src_commands():
if time_in_buffer > float(_buffer.length):
# wait to sync time
wait = time_in_buffer - float(_buffer.length)
logger.info('Wait for: ' + wait + ' seconds.')
sleep(wait)
list_date = get_date(False)
last_out = False
@ -363,7 +364,7 @@ def iter_src_commands():
else:
add_sec = 0
# calculate real time in buffer
time_in_buffer = last_time - get_time('full_sec') + add_sec
time_in_buffer = last_time - get_time('full_sec') - add_sec
begin = float(_playlist.start * 3600 - 5)
src_cmd = prepare_last_clip(clip_nodes[-1])
last_time = begin