@@ -103,7 +103,7 @@ def manage_backup(backup):
103103 spotify_ver = utils .get_file_version (os .path .join (spotify_path , "Spotify.exe" ))
104104 old = int (backup ["sver" ].replace ("." , "" )) < int (spotify_ver .replace ("." , "" ))
105105 print (f"Spotify version: { backup ['sver' ]} { f"{ Fore .RED } (OLD | CURRENT VERSION: { spotify_ver } ){ Fore .GREEN } " if old else "" } \n " )
106- option_list (["Restore" , "Delete" , "SPACER" , "Cancel" ], [partial (restore_backup , backup , old ), None , manage_backups ])
106+ option_list (["Restore" , "Delete" , "SPACER" , "Cancel" ], [partial (restore_backup , backup , old ), partial ( delete_backup , backup ) , manage_backups ])
107107
108108def restore_backup (backup , old ):
109109 utils .clear ()
@@ -120,6 +120,15 @@ def restore_backup(backup, old):
120120 f"Are you sure? { Fore .RED } This will overwrite your existing Spotify installation!{ Fore .GREEN } "
121121 )
122122
123+ def delete_backup (backup ):
124+ utils .clear ()
125+ option_list (
126+ ["I'm sure" , "Cancel" ],
127+ [partial (inject .delete_backup , backup ), partial (manage_backup , backup )],
128+ f"Are you sure? { Fore .RED } You will no longer be able to restore this backup!{ Fore .GREEN } "
129+ )
130+ manage_backups ()
131+
123132def not_detected ():
124133 print ("SpotMod is not detected on this system.\n " )
125134 option_list (["Patch Spotify" , "Quit" ], [None , quit ])
0 commit comments