Updated messages

This commit is contained in:
Uriziel 2012-09-29 09:30:15 +02:00
parent 4c78714e8e
commit 8fd929512b
2 changed files with 8 additions and 5 deletions

View File

@ -260,6 +260,8 @@ class SyncplayClientManager(object):
reactor.run() reactor.run()
def stop(self, promptForAction = True): def stop(self, promptForAction = True):
if(promptForAction):
self.ui.promptFor("Press enter to exit\n")
if not self.running: if not self.running:
return return
self.running = False self.running = False
@ -270,8 +272,7 @@ class SyncplayClientManager(object):
if self.player: if self.player:
self.player.drop() self.player.drop()
reactor.callLater(0.1, reactor.stop) reactor.callLater(0.1, reactor.stop)
if(promptForAction):
self.ui.promptFor("Press enter to exit")
def checkIfFileMatchesOthers(self): def checkIfFileMatchesOthers(self):
notMatchingList = self.users.getUsersWithNotMatchingFilenames() notMatchingList = self.users.getUsersWithNotMatchingFilenames()

View File

@ -43,9 +43,11 @@ class MPCHCAPIPlayer(object):
self.__syncplayClient.initPlayer(self) self.__syncplayClient.initPlayer(self)
self.handleUpdatedFilename(self.mpc_api.fileplaying) self.handleUpdatedFilename(self.mpc_api.fileplaying)
self.ask_for_status() self.ask_for_status()
except: except Exception, err:
pass self.__syncplayClient.ui.showMessage(err.message)
self.__syncplayClient.stop()
def display_message(self, message): def display_message(self, message):
try: try:
self.mpc_api.send_osd(message, 2, 3000) self.mpc_api.send_osd(message, 2, 3000)