mirror of https://github.com/Syncplay/syncplay
Fixes client updates checker
This commit is contained in:
parent
ff08eecf02
commit
bac3cf9a7f
|
@ -910,12 +910,13 @@ class SyncplayClient(object):
|
||||||
|
|
||||||
def checkForUpdate(self, userInitiated):
|
def checkForUpdate(self, userInitiated):
|
||||||
try:
|
try:
|
||||||
import urllib.request, urllib.parse, urllib.error, syncplay, sys, messages, json
|
import urllib.request, urllib.parse, urllib.error, syncplay, sys, json
|
||||||
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
||||||
'language': messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated})
|
'language': syncplay.messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated})
|
||||||
|
|
||||||
f = urllib.request.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params))
|
f = urllib.request.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params))
|
||||||
response = f.read()
|
response = f.read()
|
||||||
|
response = response.decode('utf-8')
|
||||||
response = response.replace("<p>","").replace("</p>","").replace("<br />","").replace("“","\"").replace("”","\"") # Fix Wordpress
|
response = response.replace("<p>","").replace("</p>","").replace("<br />","").replace("“","\"").replace("”","\"") # Fix Wordpress
|
||||||
response = json.loads(response)
|
response = json.loads(response)
|
||||||
publicServers = None
|
publicServers = None
|
||||||
|
|
Loading…
Reference in New Issue