Type check

main
Bob Mottram 2021-03-09 23:22:48 +00:00
parent 5c18b3b50f
commit 1a66c39656
1 changed files with 6 additions and 4 deletions

View File

@ -147,8 +147,10 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
title = speakerJson['notify']['title']
soundsDir = 'theme/default/sounds'
if speakerJson['notify'].get('theme'):
if isinstance(speakerJson['notify']['theme'], str):
soundsDir = \
'theme/' + speakerJson['notify']['theme'] + '/sounds'
'theme/' + \
speakerJson['notify']['theme'] + '/sounds'
if not os.path.isdir(soundsDir):
soundsDir = 'theme/default/sounds'
if speakerJson['notify']['dm'] != prevDM: