hard coded stop on error. for old behavior set stop_threshold to 0

This commit is contained in:
jonathan 2021-06-21 14:57:00 +02:00
parent f5b1b7ca4a
commit ded3fd5f1c
2 changed files with 4 additions and 6 deletions

View File

@ -1,11 +1,10 @@
general: general:
helptext: Sometimes it can happen, that a file is corrupt but still playable, helptext: Sometimes it can happen, that a file is corrupt but still playable,
this can produce an streaming error over all following files. The only way this can produce an streaming error over all following files. The only way
in this case is, to stop ffplayout and start it again here we only say it in this case is, to stop ffplayout and start it again. Here we only say when
can stop, the starting process is in your hand. Best way is a systemd serivce it stops, the starting process is in your hand. Best way is a systemd serivce
on linux. 'stop_threshold' stop ffplayout, if it is async in time above this on linux. 'stop_threshold' stop ffplayout, if it is async in time above this
value. value.
stop_on_error: True
stop_threshold: 11 stop_threshold: 11
mail: mail:

View File

@ -182,8 +182,7 @@ def load_config():
cfg = read_config() cfg = read_config()
sync_op.stop = cfg['general']['stop_on_error'] sync_op.threshold = int(cfg['general']['stop_threshold'])
sync_op.threshold = cfg['general']['stop_threshold']
mail.subject = cfg['mail']['subject'] mail.subject = cfg['mail']['subject']
mail.server = cfg['mail']['smpt_server'] mail.server = cfg['mail']['smpt_server']
@ -814,7 +813,7 @@ def check_sync(delta):
# this is needed for real time filter # this is needed for real time filter
sync_op.time_delta = delta sync_op.time_delta = delta
if sync_op.stop and abs(delta) > sync_op.threshold: if abs(delta) > sync_op.threshold > 0:
messenger.error( messenger.error(
f'Sync tolerance value exceeded with {delta:.2f} seconds,\n' f'Sync tolerance value exceeded with {delta:.2f} seconds,\n'
'program terminated!') 'program terminated!')