Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions syncplay/ui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,10 +2123,14 @@ def automaticUpdateCheck(self):
return
try:
if self.config['lastCheckedForUpdates']:
configLastChecked = datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f")
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:
lastCheckedFromConfig = QDateTime.fromString(self.config["lastCheckedForUpdates"], 'yyyy-MM-d HH:mm:ss.z')
if lastCheckedFromConfig.isValid() and (
self.lastCheckedForUpdates is None
or not self.lastCheckedForUpdates.isValid()
or lastCheckedFromConfig > self.lastCheckedForUpdates
):
self.lastCheckedForUpdates = lastCheckedFromConfig
if self.lastCheckedForUpdates is None or not self.lastCheckedForUpdates.isValid():
self.checkForUpdates()
else:
timeDelta = currentDateTimeValue.toPython() - self.lastCheckedForUpdates.toPython()
Expand Down