Beautifying code
This commit is contained in:
parent
72dfad6ea1
commit
ef606530a2
@ -153,7 +153,7 @@ class MPCHCAPIPlayer(object):
|
||||
self.askLock.release()
|
||||
|
||||
def mpc_error(self, err=""):
|
||||
print "ERROR:", str(err) + ',', "desu"
|
||||
print "ERROR:", str(err) #TODO: wyrzucić do interface'u
|
||||
if self.__syncplayClient.running:
|
||||
print 'Failed to connect to MPC-HC API!'
|
||||
self.__syncplayClient.stop()
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
from syncplay.ui.gui import GraphicalUI
|
||||
from syncplay.ui.consoleUI import ConsoleUI
|
||||
|
||||
def getUi(graphical = True):
|
||||
if(False): #graphical): #TODO: Add graphical ui
|
||||
return GraphicalUI()
|
||||
ui = GraphicalUI()
|
||||
else:
|
||||
ui = ConsoleUI()
|
||||
ui.setDaemon(True)
|
||||
ui.start()
|
||||
return ui
|
||||
ui.setDaemon()
|
||||
ui.start()
|
||||
return ui
|
||||
@ -7,7 +7,7 @@ from __future__ import print_function
|
||||
import threading
|
||||
import re
|
||||
import time
|
||||
import syncplay
|
||||
|
||||
class ConsoleUI(threading.Thread):
|
||||
def __init__(self):
|
||||
self.promptMode = threading.Event()
|
||||
@ -48,7 +48,7 @@ class ConsoleUI(threading.Thread):
|
||||
print(message)
|
||||
|
||||
def showErrorMessage(self, message):
|
||||
print("ERROR desu!:\t" + message)
|
||||
print("ERROR:\t" + message)
|
||||
|
||||
def __exectueSeekCmd(self, seek_type, minutes, seconds):
|
||||
self._syncplayClient.player_position_before_last_seek = self._syncplayClient.player_position
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user