seperated controls from artist song frame
this fixes the controls moving if song name long modified updater to restart completely if killed/encounters exception
This commit is contained in:
48
update.py
48
update.py
@@ -6,29 +6,39 @@ from time import sleep
|
||||
import subprocess
|
||||
|
||||
|
||||
# while True:
|
||||
# try:
|
||||
# urlopen('http://bbrunson.com', timeout=1)
|
||||
# print("Connection to server established.")
|
||||
# break
|
||||
# except:
|
||||
# pass
|
||||
|
||||
|
||||
# try:
|
||||
# print("Checking for updates...")
|
||||
# with ZipFile(BytesIO((urlopen('http://files.bbrunson.com/spotify-gui/update.zip')).read())) as zipObj:
|
||||
# zipObj.extractall()
|
||||
# print("Update successfully installed.")
|
||||
# except urllib.error.HTTPError:
|
||||
# print("No update available.")
|
||||
# pass
|
||||
|
||||
|
||||
while True:
|
||||
try:
|
||||
urlopen('http://bbrunson.com', timeout=1)
|
||||
print("Connection to server established.")
|
||||
break
|
||||
try:
|
||||
print("Checking for updates...")
|
||||
with ZipFile(BytesIO((urlopen('http://files.bbrunson.com/spotify-gui/update.zip')).read())) as zipObj:
|
||||
zipObj.extractall()
|
||||
print("Update successfully installed.")
|
||||
except urllib.error.HTTPError:
|
||||
print("No update available.")
|
||||
pass
|
||||
subprocess.check_call(['python3', 'spotifycontroller.py'])
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
print("Checking for updates...")
|
||||
with ZipFile(BytesIO((urlopen('http://files.bbrunson.com/spotify-gui/update.zip')).read())) as zipObj:
|
||||
zipObj.extractall()
|
||||
print("Update successfully installed.")
|
||||
except urllib.error.HTTPError:
|
||||
print("No update available.")
|
||||
pass
|
||||
|
||||
|
||||
while True:
|
||||
try:
|
||||
subprocess.check_call(['python', 'spotifycontroller.py'])
|
||||
except:
|
||||
print("An error has ocurred, reestablishing the application in 10 seconds.")
|
||||
print("An error has ocurred, checking server connection, checking for update, and then reestablishing the application in 10 seconds.")
|
||||
sleep(10)
|
||||
continue
|
||||
Reference in New Issue
Block a user