From 9b2191dde2556a829da8b91ba1d8e0a7d7a8e1ce Mon Sep 17 00:00:00 2001 From: alby128 Date: Sun, 8 Oct 2017 00:13:59 +0200 Subject: [PATCH] Changed name of lastChecked QDateTime setting --- bintray.json | 19 +++++++++++++++++++ syncplay/ui/GuiConfiguration.py | 4 ++-- syncplay/ui/gui.py | 6 ++---- 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 bintray.json diff --git a/bintray.json b/bintray.json new file mode 100644 index 0000000..9dd447f --- /dev/null +++ b/bintray.json @@ -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 +} \ No newline at end of file diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 06c0e12..3f1b9f4 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -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") diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 3764954..330aee6 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -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)