Skip to content

Commit

Permalink
Report number of exit jingles at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-stepanov committed Apr 27, 2024
1 parent 98ce4ba commit ffec03b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions advent/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ def main():
MUTE_TIMEOUT = args.mute_timeout
MUTE_TIMEOUT_TD = timedelta(seconds=MUTE_TIMEOUT)

LOGGER.info(f'TV control is \'{args.tv_control}\' with action \'{args.action}\'' + (f' for {MUTE_TIMEOUT} s max' if MUTE_TIMEOUT != 0 else ''))
if args.exit_jingles != None:
NUM_EXIT_JINGLES = args.exit_jingles

LOGGER.info(f'TV control is \'{args.tv_control}\' with action \'{args.action}\'' + (f' for {MUTE_TIMEOUT} s max' if MUTE_TIMEOUT != 0 else '') + f' and {NUM_EXIT_JINGLES} exit jingle{"" if NUM_EXIT_JINGLES % 10 == 1 and not (NUM_EXIT_JINGLES == 11) else "s"}')

if args.tv_control == 'pulseaudio':
tvc = TVControlPulseAudio()
Expand Down Expand Up @@ -428,9 +431,6 @@ def main():
REC_CONFIDENCE = args.rec_confidence
LOGGER.info(f'Recognition interval is {REC_INTERVAL} s with confidence of {REC_CONFIDENCE}%')

if args.exit_jingles != None:
NUM_EXIT_JINGLES = args.exit_jingles

# Thread control
if args.num_threads != None:
if args.num_threads < 1:
Expand Down

0 comments on commit ffec03b

Please sign in to comment.