Stop audio zombies (#317)

Version
This commit is contained in:
Will 2016-06-22 22:18:58 -04:00 committed by GitHub
parent 8b52bd56af
commit 6abc92db11

View File

@ -16,7 +16,7 @@ import time
import inspect import inspect
__author__ = "tekulvw" __author__ = "tekulvw"
__version__ = "0.0.1" __version__ = "0.1.1"
log = logging.getLogger("red.audio") log = logging.getLogger("red.audio")
@ -560,14 +560,6 @@ class Audio:
log.exception(e) log.exception(e)
raise ConnectTimeout("We timed out connecting to a voice channel") raise ConnectTimeout("We timed out connecting to a voice channel")
def _kill_player(self, server):
try:
self.voice_client(server).audio_player.process.kill()
except AttributeError:
pass
except ProcessLookupError:
pass
def _list_local_playlists(self): def _list_local_playlists(self):
ret = [] ret = []
for thing in os.listdir(self.local_playlist_path): for thing in os.listdir(self.local_playlist_path):
@ -903,7 +895,6 @@ class Audio:
if hasattr(voice_client, 'audio_player'): if hasattr(voice_client, 'audio_player'):
voice_client.audio_player.stop() voice_client.audio_player.stop()
self._kill_player(server)
del voice_client.audio_player del voice_client.audio_player
def _valid_playlist_name(self, name): def _valid_playlist_name(self, name):