Add custom sound support to Pushover (#843)

pull/898/head
cdkl 2023-07-01 12:50:06 -04:00 committed by GitHub
parent 276da2ef79
commit f1d0e9b5ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -288,9 +288,8 @@ class NotifyPushover(NotifyBase):
self.sound = NotifyPushover.default_pushover_sound \
if not isinstance(sound, str) else sound.lower()
if self.sound and self.sound not in PUSHOVER_SOUNDS:
msg = 'The sound specified ({}) is invalid.'.format(sound)
self.logger.warning(msg)
raise TypeError(msg)
msg = 'Using custom sound specified ({}). '.format(sound)
self.logger.debug(msg)
# The Priority of the message
self.priority = int(

View File

@ -60,9 +60,9 @@ apprise_url_tests = (
('pover://%s' % ('a' * 30), {
'instance': TypeError,
}),
# API Key + invalid sound setting
('pover://%s@%s?sound=invalid' % ('u' * 30, 'a' * 30), {
'instance': TypeError,
# API Key + custom sound setting
('pover://%s@%s?sound=mysound' % ('u' * 30, 'a' * 30), {
'instance': NotifyPushover,
}),
# API Key + valid alternate sound picked
('pover://%s@%s?sound=spacealarm' % ('u' * 30, 'a' * 30), {