From 6acf0a3b63f3c56d5a7908eb8fb4cfd3afb62e10 Mon Sep 17 00:00:00 2001 From: Et0h Date: Sat, 3 Jan 2015 14:07:13 +0000 Subject: [PATCH] Specify whether update check was user initiated --- syncplay/client.py | 5 ++--- syncplay/ui/gui.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index 00899b8..c675c3c 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -548,12 +548,11 @@ class SyncplayClient(object): if self.controlpasswords.has_key(room): return self.controlpasswords[room] - def checkForUpdate(self): + def checkForUpdate(self, userInitiated): try: import urllib, syncplay, sys, messages, json params = urllib.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, - 'language': messages.messages["CURRENT"], 'platform': sys.platform}) - print params + 'language': messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated}) f = urllib.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params)) response = f.read() diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 06927c4..98c2ab2 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -678,7 +678,7 @@ class MainWindow(QtGui.QMainWindow): def checkForUpdates(self, userInitiated=False): self.lastCheckedForUpdates = datetime.utcnow() - updateStatus, updateMessage, updateURL = self._syncplayClient.checkForUpdate() + updateStatus, updateMessage, updateURL = self._syncplayClient.checkForUpdate(userInitiated) if updateMessage is None: if updateStatus == "uptodate": updateMessage = getMessage("syncplay-uptodate-notification")