mirror of https://github.com/Syncplay/syncplay
Changed name of lastChecked QDateTime setting
This commit is contained in:
parent
d8edc2d3ca
commit
9b2191dde2
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"package": {
|
||||
"name": "Syncplay",
|
||||
"repo": "Syncplay",
|
||||
"subject": "alby128"
|
||||
},
|
||||
|
||||
"version": {
|
||||
"name": "1.5.0_test"
|
||||
},
|
||||
|
||||
"files":
|
||||
[
|
||||
{"includePattern": "dist_dmg/(.*)", "uploadPattern": "$1",
|
||||
"matrixParams": {
|
||||
"override": 1 }}
|
||||
],
|
||||
"publish": true
|
||||
}
|
|
@ -278,8 +278,8 @@ class ConfigDialog(QtWidgets.QDialog):
|
|||
def loadLastUpdateCheckDate(self):
|
||||
settings = QSettings("Syncplay", "Interface")
|
||||
settings.beginGroup("Update")
|
||||
self.lastCheckedForUpdates = settings.value("lastChecked", None)
|
||||
if self.lastCheckedForUpdates and type(self.lastCheckedForUpdates).__name__ == 'QDateTime':
|
||||
self.lastCheckedForUpdates = settings.value("lastCheckedQt", None)
|
||||
if self.lastCheckedForUpdates:
|
||||
if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "":
|
||||
if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"):
|
||||
self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z")
|
||||
|
|
|
@ -1524,8 +1524,6 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
return
|
||||
if self.config['lastCheckedForUpdates']:
|
||||
configLastChecked = datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f")
|
||||
if type(self.lastCheckedForUpdates).__name__ != 'QDateTime':
|
||||
self.lastCheckedForUpdates = None
|
||||
if self.lastCheckedForUpdates is None or configLastChecked > self.lastCheckedForUpdates.toPython():
|
||||
self.lastCheckedForUpdates = QDateTime.fromString(self.config["lastCheckedForUpdates"],'yyyy-MM-dd HH-mm-ss')
|
||||
if self.lastCheckedForUpdates is None:
|
||||
|
@ -1672,7 +1670,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
settings.endGroup()
|
||||
settings = QSettings("Syncplay", "Interface")
|
||||
settings.beginGroup("Update")
|
||||
settings.setValue("lastChecked", self.lastCheckedForUpdates)
|
||||
settings.setValue("lastCheckedQt", self.lastCheckedForUpdates)
|
||||
settings.endGroup()
|
||||
settings.beginGroup("PublicServerList")
|
||||
if self.publicServerList:
|
||||
|
@ -1699,7 +1697,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
settings.endGroup()
|
||||
settings = QSettings("Syncplay", "Interface")
|
||||
settings.beginGroup("Update")
|
||||
self.lastCheckedForUpdates = settings.value("lastChecked", None)
|
||||
self.lastCheckedForUpdates = settings.value("lastCheckedQt", None)
|
||||
settings.endGroup()
|
||||
settings.beginGroup("PublicServerList")
|
||||
self.publicServerList = settings.value("publicServers", None)
|
||||
|
|
Loading…
Reference in New Issue