Send 32-bit/64-bit context when updating

This commit is contained in:
Etoh 2021-07-25 12:15:09 +01:00 committed by GitHub
parent f558337b4c
commit ebb7f073e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1059,8 +1059,16 @@ class SyncplayClient(object):
def checkForUpdate(self, userInitiated): def checkForUpdate(self, userInitiated):
try: try:
import urllib.request, urllib.parse, urllib.error, syncplay, sys, json import urllib.request, urllib.parse, urllib.error, syncplay, sys, json, platform
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, 'language': syncplay.messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated}) try:
architecture = platform.architecture()[0]
except:
architecture = "Unknown"
try:
machine = platform.machine()
except:
machine = "Unknown"
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, 'language': syncplay.messages.messages["CURRENT"], 'platform': sys.platform, 'architecture': architecture, 'machine': machine, 'userInitiated': userInitiated})
if isMacOS(): if isMacOS():
import requests import requests
response = requests.get(constants.SYNCPLAY_UPDATE_URL.format(params)) response = requests.get(constants.SYNCPLAY_UPDATE_URL.format(params))