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:
Brandon4466
2023-04-08 16:16:45 -07:00
parent d346b639f5
commit 90b1448d93
4 changed files with 81 additions and 45 deletions

View File

@@ -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