Add Clear cache to the settings
A new row, "Downloaded pictures and songs", shows how much space the cached character pictures, covers and downloaded songs take, with a Clear cache button. Clearing deletes them, but keeps the songs the current quiz uses, the settings, config.ini and the saved quiz. The characters are loaded again at once; covers come back when they are shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06421bb63e
commit
c03c0e4efe
10 files changed
+1216
-679
No files matched your search
@@ -175,6 +175,15 @@ func store_song(song_object: SongObject, mp3: PackedByteArray) -> void:
|
||||
|
||||
|
||||
## Deletes the files of the songs downloaded so far, except those in [param keep].
|
||||
## The downloaded song files the playlist uses, which must be kept while it does.
|
||||
func song_files_in_use() -> PackedStringArray:
|
||||
var files: PackedStringArray = []
|
||||
for song_object: SongObject in song_object_array:
|
||||
if !song_object.song_path.is_empty():
|
||||
files.append(song_object.song_path)
|
||||
return files
|
||||
|
||||
|
||||
func clear_song_files(keep: PackedStringArray = []) -> void:
|
||||
if !DirAccess.dir_exists_absolute(songs_folder()):
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user