Sound notification support
This commit is contained in:
parent
7b905911af
commit
031d9a36cf
|
@ -8,6 +8,8 @@ from . import mailgun
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
SOUND_PATH = 'resource/sound/57808__guitarguy1985__carterattack.mp3'
|
||||
#SOUND_PATH = 'resource/sound/516855__matrixxx__wake-up-01.wav'
|
||||
|
||||
class NotificationType(enum.Enum):
|
||||
EMAIL = 1
|
||||
|
@ -30,8 +32,8 @@ def play_loud_and_annoying_sound(
|
|||
scraper_name: str,
|
||||
latest_dict: frozendict,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
import playsound3
|
||||
playsound3.playsound(SOUND_PATH, block=False)
|
||||
|
||||
NOTIFICATION_TYPE_TO_NOTIFIER = {
|
||||
NotificationType.EMAIL: send_email_notification,
|
||||
|
|
BIN
resource/sound/516855__matrixxx__wake-up-01.wav
Normal file
BIN
resource/sound/516855__matrixxx__wake-up-01.wav
Normal file
Binary file not shown.
BIN
resource/sound/57808__guitarguy1985__carterattack.mp3
Normal file
BIN
resource/sound/57808__guitarguy1985__carterattack.mp3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user