Change soundtrack covers from the app and show the cover with the answer
Cover menu in the soundtrack popup ("Change cover"):
- Choose picture uploads a JPEG, PNG or WebP picture (up to 10 MB).
- Pick by ID uses a game's cover on SteamGridDB or an anime's on AniList.
- Remove cover deletes it, so the server searches for a new one.
- The server's reason is shown when it refuses a change.
After a change the new cover time is fetched, and the popup, the
statistics card and the quiz show the new cover.
Quiz: once the answer is shown, the soundtrack's cover shows to the left of
the titles. Cover and titles are centered together, left and right and up
and down, and each title keeps to two lines. Cover times come from the
soundtrack list, and songs keep their soundtrack's UUID, also in saves.
Requests can now send any body with its content type, and every 2xx answer
counts as success. Cover frames are 2:3 like the server's covers. Small
copies of real covers are used by the tests and screenshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ef6ac8f1fd
commit
06421bb63e
33 files changed
+3966
-920
No files matched your search
@@ -108,6 +108,10 @@ func get_current_soundtrack_title() -> String:
|
||||
return song_object_array[currently_playing_song].get_soundtrack_title()
|
||||
|
||||
|
||||
func get_current_soundtrack_uuid() -> String:
|
||||
return song_object_array[currently_playing_song].get_soundtrack_uuid()
|
||||
|
||||
|
||||
func get_current_song_title() -> String:
|
||||
return song_object_array[currently_playing_song].get_song_title()
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ class_name SongObject
|
||||
var song_number: int
|
||||
var song_title: String
|
||||
var soundtrack_title: String
|
||||
## The UUID of the song's soundtrack on the server, empty for songs from a music folder.
|
||||
var soundtrack_uuid: String = ""
|
||||
|
||||
## Ids of the players who got a point for this song.
|
||||
var players_given_point: Array[String] = []
|
||||
@@ -36,6 +38,11 @@ func get_song_title() -> String:
|
||||
return "??????"
|
||||
|
||||
|
||||
## The soundtrack's UUID once the answer is shown, otherwise empty.
|
||||
func get_soundtrack_uuid() -> String:
|
||||
return soundtrack_uuid if is_answered else ""
|
||||
|
||||
|
||||
func get_song_info() -> String:
|
||||
if Settings.is_debug:
|
||||
return "%d. %s | played: %s | answered: %s" % [(song_number + 1), _full_title(),
|
||||
@@ -71,6 +78,7 @@ func to_dict() -> Dictionary:
|
||||
"number": song_number, "soundtrack": soundtrack_title, "song": song_title,
|
||||
"points": players_given_point.duplicate(), "answered": is_answered,
|
||||
"played": has_played, "playing": is_playing, "path": song_path,
|
||||
"soundtrack_uuid": soundtrack_uuid,
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +91,7 @@ static func from_dict(data: Variant) -> SongObject:
|
||||
song_object.song_number = int(data.number)
|
||||
song_object.soundtrack_title = str(data.get("soundtrack", ""))
|
||||
song_object.song_title = str(data.get("song", ""))
|
||||
song_object.soundtrack_uuid = str(data.get("soundtrack_uuid", ""))
|
||||
if data.get("points") is Array:
|
||||
for player_id: Variant in data.points:
|
||||
song_object.add_point(str(player_id))
|
||||
|
||||
Reference in new issue
Block a user