Address comments

This commit is contained in:
Daniel Ahn 2018-07-21 10:41:00 -07:00
parent 63c0573ab2
commit 1aa50a8422
4 changed files with 5 additions and 7 deletions

View File

@ -1440,7 +1440,7 @@ class UiManager(object):
def showDebugMessage(self, message):
if constants.DEBUG_MODE and message.rstrip():
sys.stderr.write("{}{}\n".format(time.strftime(constants.UI_TIME_FORMAT, time.localtime()),message.rstrip()))
sys.stderr.write("{}{}\n".format(time.strftime(constants.UI_TIME_FORMAT, time.localtime()), message.rstrip()))
def showChatMessage(self, username, userMessage):
messageString = "<{}> {}".format(username, userMessage)

View File

@ -226,11 +226,11 @@ class VlcPlayer(BasePlayer):
self._paused = bool(value != 'playing') if (value != "no-input" and not self._filechanged) else self._client.getGlobalPaused()
diff = time.time() - self._lastVLCPositionUpdate if self._lastVLCPositionUpdate else 0
if (
not self._paused and
self._paused == False
self._position == self._previousPreviousPosition and
self._previousPosition == self._position and
self._duration > constants.PLAYLIST_LOAD_NEXT_FILE_MINIMUM_LENGTH and
(self._duration - self._position) < constants.VLC_EOF_DURATION_THRandD and
(self._duration - self._position) < constants.VLC_EOF_DURATION_THRESHOLD and
diff > constants.VLC_LATENCY_ERROR_THRESHOLD
):
self._client.ui.showDebugMessage("Treating 'playing' response as 'paused' due to VLC EOF bug")

View File

@ -5,7 +5,6 @@ if "QT_PREFERRED_BINDING" not in os.environ:
["PySide2", "PySide", "PyQt5", "PyQt4"]
)
try:
from syncplay.ui.gui import MainWindow as GraphicalUI
except ImportError:
@ -14,7 +13,7 @@ from syncplay.ui.consoleUI import ConsoleUI
def getUi(graphical=True):
if graphical: # TODO: Add graphical ui
if graphical:
ui = GraphicalUI()
else:
ui = ConsoleUI()

View File

@ -8,6 +8,7 @@ import urllib.parse
import urllib.request
from datetime import datetime
from functools import wraps
from platform import python_version
from twisted.internet import task
@ -20,7 +21,6 @@ from syncplay.utils import formatTime, sameFilename, sameFilesize, sameFiledurat
from syncplay.vendor import Qt
from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, __binding_version__, __qt_version__, IsPySide, IsPySide2
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime
from platform import python_version
if IsPySide2:
from PySide2.QtCore import QStandardPaths
if isMacOS() and IsPySide:
@ -129,7 +129,6 @@ class AboutDialog(QtWidgets.QDialog):
"<p><center>" + getMessage("about-dialog-release").format(versionExtString, release_number) +
"<br />Python " + python_version() + " - " + __binding__ + " " + __binding_version__ +
" - Qt " + __qt_version__ + "</center></p>")
# versionLabel = QtWidgets.QLabel("<p><center>Version 1.5.4 release 62<br />Python 3.4.5 - PySide 1.2.4 - Qt 4.8.7</center></p>")
licenseLabel = QtWidgets.QLabel(
"<center><p>Copyright &copy; 2012&ndash;2018 Syncplay</p><p>" +
getMessage("about-dialog-license-text") + "</p></center>")