Specify whether update check was user initiated

This commit is contained in:
Et0h 2015-01-03 14:07:13 +00:00
parent f3c3028dfd
commit 6acf0a3b63
2 changed files with 3 additions and 4 deletions

View File

@ -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()

View File

@ -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")