adjusted playing now window + adjustments to the save system

This commit is contained in:
notdraimdev
2024-11-25 20:27:27 +01:00
parent 0c21592f91
commit cbdb3a4e52
3 changed files with 4 additions and 13 deletions
+3 -2
View File
@@ -76,7 +76,7 @@ var currentSongName:String
var currentArtistName:String
var currentAlbumName:String
var LoadingSaveFailed:bool
var LoadingSaveFailed:bool = true
@onready var loading_failed_screen: Control = $LoadingFailedScreen
# Called when the node enters the scene tree for the first time.
@@ -645,6 +645,7 @@ func loadUserdata() -> Dictionary:
content = json.parse_string(Marshalls.base64_to_utf8(file.get_as_text()))
file.close()
if content != null:
LoadingSaveFailed = false
return content
else:
LoadingSaveFailed = true
@@ -672,13 +673,13 @@ func loadPlaylists():
if file.get_as_text() != "" and file2.get_as_text() != "":
var PlaylistsLocationTemp
var PlaylistsTemp
LoadingSaveFailed
PlaylistsLocationTemp = json.parse_string(file.get_as_text())
PlaylistsTemp = json.parse_string(file2.get_as_text())
if (PlaylistsTemp == null) or (PlaylistsLocationTemp == null):
printerr("Loading playlists failed")
LoadingSaveFailed = true
else:
LoadingSaveFailed = false
Playlists = PlaylistsTemp
PlaylistsLocation = PlaylistsLocationTemp
print(PlaylistsLocation)