Send the play queue ID to the server
The server keeps a play queue per client, identified by the X-Queue-Id header. The client sends the ID it has for the selected server with every request and keeps the one in each response, which is new after a reset or a sync. The IDs are saved per server in the [queues] section of settings.cfg, so the game goes on with the same queue after a restart. HttpTransport now passes the response headers on to the client.
This commit is contained in:
1 parent
d21b3e2ce0
commit
4a45e8516d
8 files changed
+212
-16
No files matched your search
@@ -95,6 +95,27 @@ func test_statistics_settings_are_not_saved() -> void:
|
||||
assert_bool(file.has_section_key("quiz", "use_low_played_mode")).is_false()
|
||||
|
||||
|
||||
func test_queue_ids_are_saved_and_load_back() -> void:
|
||||
Settings.set_queue_id("https://music.example.com", "queue-1")
|
||||
Settings.winning_score = 12
|
||||
Settings.save_settings()
|
||||
Settings.queue_ids.clear()
|
||||
|
||||
Settings.load_saved_settings()
|
||||
|
||||
assert_str(_saved_file().get_value("queues", "https://music.example.com")).is_equal("queue-1")
|
||||
assert_dict(Settings.queue_ids).is_equal({"https://music.example.com": "queue-1"})
|
||||
|
||||
|
||||
func test_file_without_queues_keeps_the_current_queue_ids() -> void:
|
||||
Settings.save_settings()
|
||||
Settings.queue_ids["https://music.example.com"] = "queue-1"
|
||||
|
||||
Settings.load_saved_settings()
|
||||
|
||||
assert_dict(Settings.queue_ids).is_equal({"https://music.example.com": "queue-1"})
|
||||
|
||||
|
||||
func test_fullscreen_is_saved_when_it_changes() -> void:
|
||||
Settings.set_fullscreen(true)
|
||||
assert_bool(_saved_file().get_value("window", "fullscreen")).is_true()
|
||||
|
||||
Reference in new issue
Block a user