Skip to content

Commit

Permalink
Changed update process to only require one restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Protonosgit committed Jan 13, 2024
1 parent 569c00a commit 8270bb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/shellbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def run(self):
print("Update started")
try:
self.progress_signal.emit("Auto Updating...")
subprocess.run('spicetify update -q -n', shell=True, check=True)
# subprocess.run('spicetify update -q -n', shell=True, check=True)
subprocess.run('spicetify restore -q -n', shell=True, check=True)
subprocess.run('spicetify upgrade -q -n', shell=True, check=True)
subprocess.run('spicetify apply -q -n', shell=True, check=True)
self.progress_signal.emit("done")
except Exception as e:
self.progress_signal.emit("fail")
Expand Down Expand Up @@ -178,6 +181,7 @@ def blockSpotifyUpdate(active):


class RestartSpotify(QThread):
# Warning this will probably replaced with spicetify restart in the future!
def run(self):
print("Restarting Spotify")
if checkSpotifyRunning():
Expand Down
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ def setup_finished(self):

# Called when spicetify is updated
def update_finished(self):
windowsToast("Spicetify update process completed!", "")
if not self.isNeverRestarting:
self.iprocess = RestartSpotify()
self.iprocess.start()
Expand Down

0 comments on commit 8270bb3

Please sign in to comment.