Specify whether update check was user initiated
This commit is contained in:
parent
f3c3028dfd
commit
6acf0a3b63
@ -548,12 +548,11 @@ class SyncplayClient(object):
|
|||||||
if self.controlpasswords.has_key(room):
|
if self.controlpasswords.has_key(room):
|
||||||
return self.controlpasswords[room]
|
return self.controlpasswords[room]
|
||||||
|
|
||||||
def checkForUpdate(self):
|
def checkForUpdate(self, userInitiated):
|
||||||
try:
|
try:
|
||||||
import urllib, syncplay, sys, messages, json
|
import urllib, syncplay, sys, messages, json
|
||||||
params = urllib.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
params = urllib.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
||||||
'language': messages.messages["CURRENT"], 'platform': sys.platform})
|
'language': messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated})
|
||||||
print params
|
|
||||||
|
|
||||||
f = urllib.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params))
|
f = urllib.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params))
|
||||||
response = f.read()
|
response = f.read()
|
||||||
|
|||||||
@ -678,7 +678,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
|
|
||||||
def checkForUpdates(self, userInitiated=False):
|
def checkForUpdates(self, userInitiated=False):
|
||||||
self.lastCheckedForUpdates = datetime.utcnow()
|
self.lastCheckedForUpdates = datetime.utcnow()
|
||||||
updateStatus, updateMessage, updateURL = self._syncplayClient.checkForUpdate()
|
updateStatus, updateMessage, updateURL = self._syncplayClient.checkForUpdate(userInitiated)
|
||||||
if updateMessage is None:
|
if updateMessage is None:
|
||||||
if updateStatus == "uptodate":
|
if updateStatus == "uptodate":
|
||||||
updateMessage = getMessage("syncplay-uptodate-notification")
|
updateMessage = getMessage("syncplay-uptodate-notification")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user