Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 5992895

Browse files
committed
graphical changes,iproved uninstall, and fixed progress
1 parent 96b3cf6 commit 5992895

File tree

9 files changed

+38
-30
lines changed

9 files changed

+38
-30
lines changed

components/popups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def errorDialog(text):
55
error_dialog = QErrorMessage()
6-
error_dialog.setWindowTitle('Warning an error occured')
6+
error_dialog.setWindowTitle('Warning an error was detected')
77
error_dialog.showMessage(text)
88
error_dialog.exec()
99

components/shellbridge.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import psutil
55
import shutil
66
from PyQt6.QtCore import Qt, QThread, pyqtSignal
7-
import requests
87

98
# Installer task for both windows and linux/mac with progress and error handling
109
class InstallSpicetify(QThread):
@@ -25,12 +24,12 @@ def run(self):
2524
subprocess.run('spicetify apply -n -q',check=True)
2625
self.progress_signal.emit("Installing Marketplace...")
2726
subprocess.run('powershell.exe -Command "iwr -useb https://raw.githubusercontent.com/spicetify/spicetify-marketplace/main/resources/install.ps1 | iex"',check=True)
27+
self.progress_signal.emit("done")
2828
except Exception as e:
2929
print("Error detected!")
3030
print(e)
3131
self.progress_signal.emit("fail")
32-
finally:
33-
self.progress_signal.emit("done")
32+
3433
self.finished_signal.emit()
3534

3635
# Update spicetify task

manager_window.py

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import sys
66
import subprocess
7-
from PyQt6.QtWidgets import QMainWindow
7+
from PyQt6.QtWidgets import QMainWindow,QMessageBox
88
from PyQt6.QtCore import Qt, QUrl
99
from PyQt6.uic import loadUi
1010
from PyQt6.QtGui import QDesktopServices
@@ -66,7 +66,7 @@ def masterButton(self):
6666
self.l_versioninfo.setText('⏳Please wait⏳')
6767
self.iprocess = InstallSpicetify()
6868
self.iprocess.finished_signal.connect(self.setup_finished)
69-
self.iprocess.progress_signal.connect(self.progressmaster)
69+
self.iprocess.progress_signal.connect(self.installProgress)
7070
self.iprocess.start()
7171
elif self.managermode == 3:
7272
self.setCursor(Qt.CursorShape.WaitCursor)
@@ -96,11 +96,16 @@ def masterButton(self):
9696
self.iprocess.start()
9797

9898
#Update user about progress while installing spicetify
99-
def progressmaster(self, action):
99+
def installProgress(self, action):
100100
if (action == "fail"):
101101
self.l_status.setStyleSheet("color: red")
102102
self.l_status.setText("⚠️ Installer has crashed ⚠️")
103103
errorDialog("The installation of Spicetify has failed due to an unrecoverable error! Check logs or ask for help.")
104+
elif (action == "done"):
105+
self.SystemSoftStatusCheck()
106+
windowsNotification("Spicetify Manager", "Spicetify has successfully been installed!")
107+
dialog = Popup(self)
108+
dialog.exec()
104109
else:
105110
self.l_status.setStyleSheet("color: Orange")
106111
self.l_status.setText(action)
@@ -110,15 +115,19 @@ def progressmaster(self, action):
110115

111116
# Launch uninstaller task
112117
def startRemoval(self):
113-
self.setCursor(Qt.CursorShape.WaitCursor)
114-
self.bt_uninstall.setEnabled(False)
115-
self.bt_refresh.setEnabled(False)
116-
self.bt_master.setEnabled(False)
117-
self.l_status.setStyleSheet("color: Orange")
118-
self.l_status.setText("Uninstalling Spicetify...")
119-
self.iprocess = UninstallSpicetify()
120-
self.iprocess.finished_signal.connect(self.uninstall_finished)
121-
self.iprocess.start()
118+
reply = QMessageBox.question(None, 'Confirmation', 'Are you sure you want to uninstall Spicetify?', QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
119+
if reply == QMessageBox.StandardButton.Yes:
120+
self.setCursor(Qt.CursorShape.WaitCursor)
121+
self.bt_uninstall.setEnabled(False)
122+
self.bt_refresh.setEnabled(False)
123+
self.bt_master.setEnabled(False)
124+
self.l_status.setStyleSheet("color: Orange")
125+
self.l_status.setText("Uninstalling Spicetify...")
126+
self.iprocess = UninstallSpicetify()
127+
self.iprocess.finished_signal.connect(self.uninstall_finished)
128+
self.iprocess.start()
129+
else:
130+
return False
122131

123132

124133
# Run custom commands
@@ -138,10 +147,7 @@ def DisableUpdate(self):
138147

139148
#Called when spicetify is installed or not?
140149
def setup_finished(self):
141-
self.SystemSoftStatusCheck()
142-
dialog = Popup(self)
143-
dialog.exec()
144-
windowsNotification("Spicetify Manager", "Spicetify has successfully been installed!")
150+
pass
145151

146152
#Called when spicetify is applied
147153
def apply_finished(self):
@@ -153,6 +159,7 @@ def update_finished(self):
153159
self.SystemSoftStatusCheck()
154160
windowsNotification("Spicetify Manager", "Spicetify has been updated!")
155161

162+
156163
#Called when spicetify is uninstalled
157164
def uninstall_finished(self):
158165
self.SystemSoftStatusCheck()
@@ -234,10 +241,12 @@ def installerUiUpdate(self):
234241
self.l_versioninfo.setText('Press install to start the process')
235242
#self.l_versioninfo.setText('Latest version: '+self.LATESTSPICETIFYVER)
236243
self.bt_master.setText("Install")
244+
self.bt_uninstall.setEnabled(False)
237245
self.managermode = 2
238246
else:
239247
self.l_status.setText("Spotify is not installed")
240248
self.l_status.setStyleSheet("color: red")
241249
self.l_versioninfo.setText('Download Spotify from the official website')
242250
self.bt_master.setText("Download")
251+
self.bt_uninstall.setEnabled(False)
243252
self.managermode = 1

res/Frame 12.png

33.2 KB
Loading

res/afterinstalltip.ui

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
<rect>
6969
<x>0</x>
7070
<y>0</y>
71-
<width>81</width>
72-
<height>231</height>
71+
<width>71</width>
72+
<height>291</height>
7373
</rect>
7474
</property>
7575
<property name="text">
7676
<string/>
7777
</property>
7878
<property name="pixmap">
79-
<pixmap>spotify_sidebar.jpg</pixmap>
79+
<pixmap>spotify-sidebar-hint.jpg</pixmap>
8080
</property>
8181
<property name="scaledContents">
8282
<bool>true</bool>
@@ -85,9 +85,9 @@
8585
<widget class="QTextBrowser" name="textBrowser">
8686
<property name="geometry">
8787
<rect>
88-
<x>100</x>
88+
<x>90</x>
8989
<y>20</y>
90-
<width>381</width>
90+
<width>391</width>
9191
<height>211</height>
9292
</rect>
9393
</property>

res/manager.ui

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</property>
4545
<property name="windowIcon">
4646
<iconset>
47-
<normaloff>logo.png</normaloff>logo.png</iconset>
47+
<normaloff>Frame 12.png</normaloff>Frame 12.png</iconset>
4848
</property>
4949
<property name="styleSheet">
5050
<string notr="true"/>
@@ -216,15 +216,15 @@ QPushButton:pressed
216216
<rect>
217217
<x>20</x>
218218
<y>10</y>
219-
<width>71</width>
219+
<width>81</width>
220220
<height>71</height>
221221
</rect>
222222
</property>
223223
<property name="text">
224224
<string/>
225225
</property>
226226
<property name="pixmap">
227-
<pixmap>logo.png</pixmap>
227+
<pixmap>Frame 12.png</pixmap>
228228
</property>
229229
<property name="scaledContents">
230230
<bool>true</bool>
@@ -701,7 +701,7 @@ li.checked::marker { content: &quot;\2612&quot;; }
701701
<string notr="true">color:white;</string>
702702
</property>
703703
<property name="text">
704-
<string>Project spicy green 2023 v0.3</string>
704+
<string>Project spicy green 2023 v0.4</string>
705705
</property>
706706
<property name="alignment">
707707
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

res/splash.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ background: rgba(0,0,0,0.5);</string>
122122
background: rgba(0,0,0,0.0);</string>
123123
</property>
124124
<property name="text">
125-
<string>V 0.3</string>
125+
<string>V 0.4</string>
126126
</property>
127127
<property name="alignment">
128128
<set>Qt::AlignCenter</set>

res/spotify-sidebar-hint.jpg

13.8 KB
Loading

res/spotify_sidebar.jpg

-5 KB
Binary file not shown.

0 commit comments

Comments
 (0)