Now exits on player exit

This commit is contained in:
Uriziel 2012-09-22 14:38:55 +02:00
parent bd2469be6f
commit 42fbc310fa

View File

@ -3,6 +3,7 @@
from ..mpc_api import MPC_API from ..mpc_api import MPC_API
import time import time
import threading import threading
import sys
class MPCHCAPIPlayer(object): class MPCHCAPIPlayer(object):
def __init__(self, manager): def __init__(self, manager):
@ -154,6 +155,7 @@ class MPCHCAPIPlayer(object):
def mpc_error(self, err=""): def mpc_error(self, err=""):
self.__syncplayClient.stop() self.__syncplayClient.stop()
sys.exit()
def run_mpc(manager, mpc_path, file_path, args): def run_mpc(manager, mpc_path, file_path, args):
mpc = MPCHCAPIPlayer(manager) mpc = MPCHCAPIPlayer(manager)