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