mirror of https://github.com/caronc/apprise
Add custom sound support to Pushover (#843)
parent
276da2ef79
commit
f1d0e9b5ec
|
@ -288,9 +288,8 @@ class NotifyPushover(NotifyBase):
|
||||||
self.sound = NotifyPushover.default_pushover_sound \
|
self.sound = NotifyPushover.default_pushover_sound \
|
||||||
if not isinstance(sound, str) else sound.lower()
|
if not isinstance(sound, str) else sound.lower()
|
||||||
if self.sound and self.sound not in PUSHOVER_SOUNDS:
|
if self.sound and self.sound not in PUSHOVER_SOUNDS:
|
||||||
msg = 'The sound specified ({}) is invalid.'.format(sound)
|
msg = 'Using custom sound specified ({}). '.format(sound)
|
||||||
self.logger.warning(msg)
|
self.logger.debug(msg)
|
||||||
raise TypeError(msg)
|
|
||||||
|
|
||||||
# The Priority of the message
|
# The Priority of the message
|
||||||
self.priority = int(
|
self.priority = int(
|
||||||
|
|
|
@ -60,9 +60,9 @@ apprise_url_tests = (
|
||||||
('pover://%s' % ('a' * 30), {
|
('pover://%s' % ('a' * 30), {
|
||||||
'instance': TypeError,
|
'instance': TypeError,
|
||||||
}),
|
}),
|
||||||
# API Key + invalid sound setting
|
# API Key + custom sound setting
|
||||||
('pover://%s@%s?sound=invalid' % ('u' * 30, 'a' * 30), {
|
('pover://%s@%s?sound=mysound' % ('u' * 30, 'a' * 30), {
|
||||||
'instance': TypeError,
|
'instance': NotifyPushover,
|
||||||
}),
|
}),
|
||||||
# API Key + valid alternate sound picked
|
# API Key + valid alternate sound picked
|
||||||
('pover://%s@%s?sound=spacealarm' % ('u' * 30, 'a' * 30), {
|
('pover://%s@%s?sound=spacealarm' % ('u' * 30, 'a' * 30), {
|
||||||
|
|
Loading…
Reference in New Issue