Merge pull request #178 from fishyboteso/wip/beep_bug

beep sound when sound notification abled and no beep sound when disabled
This commit is contained in:
Adam Saudagar 2023-10-01 00:41:25 +05:30 committed by GitHub
commit c67a40a7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ from typing import Dict, Optional, Callable
from playsound import playsound from playsound import playsound
from fishy import helper from fishy import helper
from fishy.helper.config import config
from fishy.helper.hotkey import process from fishy.helper.hotkey import process
from fishy.helper.hotkey.process import Key from fishy.helper.hotkey.process import Key
@ -63,7 +64,9 @@ class HotKey:
if key in Key: if key in Key:
callback = self._hotkeys[key] callback = self._hotkeys[key]
if callback: if callback:
playsound(helper.manifest_file("beep.wav"), False) if config.get("sound_notification", False):
playsound(helper.manifest_file("beep.wav"), False)
callback() callback()
time.sleep(0.1) time.sleep(0.1)