updated background dominant color calculation

reworked updater to work as handler, will restart if exception
This commit is contained in:
Brandon4466
2023-03-27 00:13:26 -07:00
parent ef4d0fee66
commit cf6f02acd1
7 changed files with 58 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ from urllib.request import urlopen
from zipfile import ZipFile
from io import BytesIO
from time import sleep
import subprocess
while True:
@@ -23,9 +24,11 @@ except urllib.error.HTTPError:
print("No update available.")
pass
try:
exec(open('spotifycontroller.py').read())
except:
print("An error has ocurred, reestablishing the application in 10 seconds.")
sleep(10)
exec(open('spotifycontroller.py').read())
while True:
try:
subprocess.check_call(['python', 'spotifycontroller.py'])
except:
print("An error has ocurred, reestablishing the application in 10 seconds.")
sleep(10)
continue