Reverted most code back to == False. Future code should consider using is False if possible.
This commit is contained in:
parent
6f70cff585
commit
63c0573ab2
@ -57,7 +57,7 @@ def isValidLanguage(language):
|
|||||||
|
|
||||||
|
|
||||||
def getMessage(type_, locale=None):
|
def getMessage(type_, locale=None):
|
||||||
if not constants.SHOW_TOOLTIPS:
|
if constants.SHOW_TOOLTIPS == False:
|
||||||
if "-tooltip" in type_:
|
if "-tooltip" in type_:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|||||||
@ -395,12 +395,12 @@ class MplayerPlayer(BasePlayer):
|
|||||||
def setReadyToSend(self, newReadyState):
|
def setReadyToSend(self, newReadyState):
|
||||||
oldState = self.readyToSend
|
oldState = self.readyToSend
|
||||||
self.readyToSend = newReadyState
|
self.readyToSend = newReadyState
|
||||||
self.lastNotReadyTime = time.time() if not newReadyState else None
|
self.lastNotReadyTime = time.time() if newReadyState == False else None
|
||||||
if self.readyToSend:
|
if self.readyToSend:
|
||||||
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: True")
|
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: True")
|
||||||
else:
|
else:
|
||||||
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: False")
|
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: False")
|
||||||
if self.readyToSend and not oldState:
|
if self.readyToSend and oldState == False:
|
||||||
self.processSendQueue()
|
self.processSendQueue()
|
||||||
|
|
||||||
def checkForReadinessOverride(self):
|
def checkForReadinessOverride(self):
|
||||||
|
|||||||
@ -150,7 +150,7 @@ class NewMpvPlayer(OldMpvPlayer):
|
|||||||
pauseValue = "yes" if value else "no"
|
pauseValue = "yes" if value else "no"
|
||||||
self._setProperty("pause", pauseValue)
|
self._setProperty("pause", pauseValue)
|
||||||
self._paused = value
|
self._paused = value
|
||||||
if not value:
|
if value == False:
|
||||||
self.lastMPVPositionUpdate = time.time()
|
self.lastMPVPositionUpdate = time.time()
|
||||||
|
|
||||||
def _getProperty(self, property_):
|
def _getProperty(self, property_):
|
||||||
|
|||||||
@ -238,7 +238,7 @@ class VlcPlayer(BasePlayer):
|
|||||||
self._pausedAsk.set()
|
self._pausedAsk.set()
|
||||||
elif name == "position":
|
elif name == "position":
|
||||||
newPosition = float(value.replace(",", ".")) if (value != "no-input" and not self._filechanged) else self._client.getGlobalPosition()
|
newPosition = float(value.replace(",", ".")) if (value != "no-input" and not self._filechanged) else self._client.getGlobalPosition()
|
||||||
if newPosition == self._previousPosition and newPosition != self._duration and not self._paused:
|
if newPosition == self._previousPosition and newPosition != self._duration and self._paused is False:
|
||||||
self._client.ui.showDebugMessage(
|
self._client.ui.showDebugMessage(
|
||||||
"Not considering position {} duplicate as new time because of VLC time precision bug".format(
|
"Not considering position {} duplicate as new time because of VLC time precision bug".format(
|
||||||
newPosition))
|
newPosition))
|
||||||
@ -341,6 +341,7 @@ class VlcPlayer(BasePlayer):
|
|||||||
call.append(filePath)
|
call.append(filePath)
|
||||||
else:
|
else:
|
||||||
call.append(self.__playerController.getMRL(filePath))
|
call.append(self.__playerController.getMRL(filePath))
|
||||||
|
|
||||||
def _usevlcintf(vlcIntfPath, vlcIntfUserPath):
|
def _usevlcintf(vlcIntfPath, vlcIntfUserPath):
|
||||||
vlcSyncplayInterfacePath = vlcIntfPath + "syncplay.lua"
|
vlcSyncplayInterfacePath = vlcIntfPath + "syncplay.lua"
|
||||||
if not os.path.isfile(vlcSyncplayInterfacePath):
|
if not os.path.isfile(vlcSyncplayInterfacePath):
|
||||||
|
|||||||
@ -239,6 +239,7 @@ class ConfigurationGetter(object):
|
|||||||
return True
|
return True
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for key in self._boolean:
|
for key in self._boolean:
|
||||||
if self._config[key] == "True":
|
if self._config[key] == "True":
|
||||||
self._config[key] = True
|
self._config[key] = True
|
||||||
|
|||||||
@ -98,7 +98,7 @@ class ConfigDialog(QtWidgets.QDialog):
|
|||||||
|
|
||||||
def moreToggled(self):
|
def moreToggled(self):
|
||||||
self.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
self.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
|
||||||
if not self.moreToggling:
|
if self.moreToggling is False:
|
||||||
self.moreToggling = True
|
self.moreToggling = True
|
||||||
|
|
||||||
if self.showmoreCheckbox.isChecked():
|
if self.showmoreCheckbox.isChecked():
|
||||||
@ -1314,7 +1314,7 @@ class ConfigDialog(QtWidgets.QDialog):
|
|||||||
self.addBottomLayout()
|
self.addBottomLayout()
|
||||||
self.updatePasswordVisibilty()
|
self.updatePasswordVisibilty()
|
||||||
|
|
||||||
if not self.getMoreState():
|
if self.getMoreState() is False:
|
||||||
self.tabListFrame.hide()
|
self.tabListFrame.hide()
|
||||||
self.resetButton.hide()
|
self.resetButton.hide()
|
||||||
self.playerargsTextbox.hide()
|
self.playerargsTextbox.hide()
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate):
|
|||||||
midY - 8,
|
midY - 8,
|
||||||
tickIconQPixmap.scaled(16, 16, Qt.KeepAspectRatio))
|
tickIconQPixmap.scaled(16, 16, Qt.KeepAspectRatio))
|
||||||
|
|
||||||
elif not userReady and not crossIconQPixmap.isNull():
|
elif userReady == False and not crossIconQPixmap.isNull():
|
||||||
itemQPainter.drawPixmap(
|
itemQPainter.drawPixmap(
|
||||||
(optionQStyleOptionViewItem.rect.x()-10),
|
(optionQStyleOptionViewItem.rect.x()-10),
|
||||||
midY - 8,
|
midY - 8,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user