mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-22 22:16:49 +00:00
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):
|
||||
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()
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user