Preload songs only after the song list has loaded
At startup and after resetting the playlist, loading the song list and preloading the first song started at the same time. When the list answered last, it cleared the playlist and dropped the preloaded song. Preloading now starts once the list has loaded, and loading the list is retried if it fails.
This commit is contained in:
1 parent
ed292877ef
commit
739d0f7af6
5 files changed
+78
-8
No files matched your search
@@ -36,12 +36,19 @@ func before_test() -> void:
|
||||
_server.respond_bytes("/music/reset", PackedByteArray())
|
||||
_server.respond_bytes("/music/played?song=0", PackedByteArray())
|
||||
|
||||
_before_window_starts()
|
||||
_runner = scene_runner("res://MainWindow.tscn")
|
||||
_window = _runner.scene()
|
||||
# The debug build lowers the winning score on startup; keep it out of reach
|
||||
Settings.winning_score = 20
|
||||
|
||||
|
||||
## Override to change the fake server before the window starts and sends its first
|
||||
## requests.
|
||||
func _before_window_starts() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func after_test() -> void:
|
||||
# Let nodes queued for deletion by the window be freed before orphans are counted
|
||||
await await_idle_frame()
|
||||
|
||||
Reference in new issue
Block a user