The bar in the Sync popup is now an AnimatedProgressBar: taller, with a darker track and the theme's accent fill (orange, frost blue in Nord, green with a gold shine for Christmas). It shows Godot's busy animation until the server reports progress, glides to each new value, has a soft highlight sweeping along the filled part inside its rounded corners, and fills and pops before the result shows. With Reduce animations it only jumps to its values. The styles are SyncProgressBar, SyncProgressBarFill and SyncProgressBarText in every theme. Anim.stop stops a keyed animation without starting an empty one. The server now sends sync times as "MM:SS"; the spec is updated from MusicServer develop (also the linux-package route), and the test data and screenshots use the new format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.8 KiB
GDScript
43 lines
1.8 KiB
GDScript
# Generated by tools/generate_api_types.gd from server/openapi.json.
|
|
# Do not edit; change the server and generate again.
|
|
class_name SyncResponse
|
|
extends RefCounted
|
|
## The [code]SyncResponse[/code] schema of the MusicServer API.
|
|
|
|
var catched_errors: Array[String]
|
|
var soundtracks_added: Array[String]
|
|
var soundtracks_changed_content: Array[String]
|
|
var soundtracks_changed_title: Dictionary[String, String]
|
|
var soundtracks_re_added: Array[String]
|
|
var soundtracks_removed: Array[String]
|
|
## How long the sync took, as minutes and seconds, e.g. "02:15"
|
|
var total_time: String
|
|
|
|
|
|
## Reads the fields from parsed JSON. Missing fields keep their defaults.
|
|
static func from_dict(data: Dictionary) -> SyncResponse:
|
|
var result: SyncResponse = SyncResponse.new()
|
|
result.catched_errors.assign(ApiJson.get_array(data, "catched_errors"))
|
|
result.soundtracks_added.assign(ApiJson.get_array(data, "soundtracks_added"))
|
|
result.soundtracks_changed_content.assign(
|
|
ApiJson.get_array(data, "soundtracks_changed_content"))
|
|
result.soundtracks_changed_title.assign(
|
|
ApiJson.get_dictionary(data, "soundtracks_changed_title"))
|
|
result.soundtracks_re_added.assign(ApiJson.get_array(data, "soundtracks_re_added"))
|
|
result.soundtracks_removed.assign(ApiJson.get_array(data, "soundtracks_removed"))
|
|
result.total_time = ApiJson.get_string(data, "total_time", "")
|
|
return result
|
|
|
|
|
|
## Returns the fields under their JSON names, ready for [method JSON.stringify].
|
|
func to_dict() -> Dictionary:
|
|
return {
|
|
"catched_errors": catched_errors,
|
|
"soundtracks_added": soundtracks_added,
|
|
"soundtracks_changed_content": soundtracks_changed_content,
|
|
"soundtracks_changed_title": soundtracks_changed_title,
|
|
"soundtracks_re_added": soundtracks_re_added,
|
|
"soundtracks_removed": soundtracks_removed,
|
|
"total_time": total_time,
|
|
}
|