Sound notification support
This commit is contained in:
parent
7b905911af
commit
031d9a36cf
|
@ -8,6 +8,8 @@ from . import mailgun
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
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):
|
class NotificationType(enum.Enum):
|
||||||
EMAIL = 1
|
EMAIL = 1
|
||||||
|
@ -30,8 +32,8 @@ def play_loud_and_annoying_sound(
|
||||||
scraper_name: str,
|
scraper_name: str,
|
||||||
latest_dict: frozendict,
|
latest_dict: frozendict,
|
||||||
) -> None:
|
) -> None:
|
||||||
pass
|
import playsound3
|
||||||
|
playsound3.playsound(SOUND_PATH, block=False)
|
||||||
|
|
||||||
NOTIFICATION_TYPE_TO_NOTIFIER = {
|
NOTIFICATION_TYPE_TO_NOTIFIER = {
|
||||||
NotificationType.EMAIL: send_email_notification,
|
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