Reverted most code back to == False. Future code should consider using is False if possible.

This commit is contained in:
Daniel Ahn 2018-07-21 03:20:34 -07:00
parent 6f70cff585
commit 63c0573ab2
7 changed files with 10 additions and 8 deletions

View File

@ -57,7 +57,7 @@ def isValidLanguage(language):
def getMessage(type_, locale=None):
if not constants.SHOW_TOOLTIPS:
if constants.SHOW_TOOLTIPS == False:
if "-tooltip" in type_:
return ""

View File

@ -395,12 +395,12 @@ class MplayerPlayer(BasePlayer):
def setReadyToSend(self, newReadyState):
oldState = self.readyToSend
self.readyToSend = newReadyState
self.lastNotReadyTime = time.time() if not newReadyState else None
self.lastNotReadyTime = time.time() if newReadyState == False else None
if self.readyToSend:
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: True")
else:
self.__playerController._client.ui.showDebugMessage("<mpv> Ready to send: False")
if self.readyToSend and not oldState:
if self.readyToSend and oldState == False:
self.processSendQueue()
def checkForReadinessOverride(self):

View File

@ -150,7 +150,7 @@ class NewMpvPlayer(OldMpvPlayer):
pauseValue = "yes" if value else "no"
self._setProperty("pause", pauseValue)
self._paused = value
if not value:
if value == False:
self.lastMPVPositionUpdate = time.time()
def _getProperty(self, property_):

View File

@ -238,7 +238,7 @@ class VlcPlayer(BasePlayer):
self._pausedAsk.set()
elif name == "position":
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(
"Not considering position {} duplicate as new time because of VLC time precision bug".format(
newPosition))
@ -341,6 +341,7 @@ class VlcPlayer(BasePlayer):
call.append(filePath)
else:
call.append(self.__playerController.getMRL(filePath))
def _usevlcintf(vlcIntfPath, vlcIntfUserPath):
vlcSyncplayInterfacePath = vlcIntfPath + "syncplay.lua"
if not os.path.isfile(vlcSyncplayInterfacePath):

View File

@ -239,6 +239,7 @@ class ConfigurationGetter(object):
return True
except:
return False
for key in self._boolean:
if self._config[key] == "True":
self._config[key] = True

View File

@ -98,7 +98,7 @@ class ConfigDialog(QtWidgets.QDialog):
def moreToggled(self):
self.setSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
if not self.moreToggling:
if self.moreToggling is False:
self.moreToggling = True
if self.showmoreCheckbox.isChecked():
@ -1314,7 +1314,7 @@ class ConfigDialog(QtWidgets.QDialog):
self.addBottomLayout()
self.updatePasswordVisibilty()
if not self.getMoreState():
if self.getMoreState() is False:
self.tabListFrame.hide()
self.resetButton.hide()
self.playerargsTextbox.hide()

View File

@ -80,7 +80,7 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate):
midY - 8,
tickIconQPixmap.scaled(16, 16, Qt.KeepAspectRatio))
elif not userReady and not crossIconQPixmap.isNull():
elif userReady == False and not crossIconQPixmap.isNull():
itemQPainter.drawPixmap(
(optionQStyleOptionViewItem.rect.x()-10),
midY - 8,