mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
got pygame working on windows, so we no longer need this windows check
This commit is contained in:
parent
6195627caf
commit
9f69cccd02
@ -87,21 +87,20 @@ class Notification:
|
||||
|
||||
def sound(self):
|
||||
"""plays a sound when a torrent finishes"""
|
||||
if not deluge.common.windows_check():
|
||||
try:
|
||||
import pygame
|
||||
except:
|
||||
log.warning("pygame is not installed")
|
||||
else:
|
||||
pygame.init()
|
||||
try:
|
||||
import pygame
|
||||
except:
|
||||
log.warning("pygame is not installed")
|
||||
alert_sound = pygame.mixer.music
|
||||
alert_sound.load(self.config["ntf_sound_path"])
|
||||
alert_sound.play()
|
||||
except pygame.error, message:
|
||||
log.warning("pygame failed to play because %s" % (message))
|
||||
else:
|
||||
pygame.init()
|
||||
try:
|
||||
alert_sound = pygame.mixer.music
|
||||
alert_sound.load(self.config["ntf_sound_path"])
|
||||
alert_sound.play()
|
||||
except pygame.error, message:
|
||||
log.warning("pygame failed to play because %s" % (message))
|
||||
else:
|
||||
log.info("sound notification played successfully")
|
||||
log.info("sound notification played successfully")
|
||||
|
||||
def email(self, status):
|
||||
"""sends email notification of finished torrent"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user