Wrap Song in a broader Playback state object with stuff like volume and repeat mode

This commit is contained in:
Danielle McLean 2024-07-26 09:53:17 +10:00
parent 085bca7974
commit 68609f3d07
Signed by: 00dani
GPG key ID: 6854781A0488421C
24 changed files with 765 additions and 245 deletions

View file

@ -80,15 +80,6 @@
"properties": {},
"title": "NoArtwork",
"type": "object"
},
"PlaybackState": {
"enum": [
"play",
"pause",
"stop"
],
"title": "PlaybackState",
"type": "string"
}
},
"$id": "https://cdn.00dani.me/m/schemata/mpd-now-playable/song-v1.json",
@ -144,7 +135,7 @@
"type": "integer"
},
"duration": {
"description": "The song's duration as read from its tags, measured in seconds. Fractional seconds are allowed.",
"description": "The song's duration as read from its tags, measured in seconds. Fractional seconds are allowed. The duration may be unavailable for some sources, such as internet radio streams.",
"title": "Duration",
"type": "number"
},
@ -171,19 +162,14 @@
"$ref": "#/$defs/MusicBrainzIds",
"description": "The MusicBrainz IDs associated with the song and with its artist and album, which if present are an extremely accurate way to identify a given song. They're not always present, though."
},
"queue_index": {
"description": "The zero-based index of the current song in MPD's queue.",
"title": "Queue Index",
"type": "integer"
},
"queue_length": {
"description": "The total length of MPD's queue - the last song in the queue will have the index one less than this, since queue indices are zero-based.",
"title": "Queue Length",
"type": "integer"
},
"state": {
"$ref": "#/$defs/PlaybackState",
"description": "Whether MPD is currently playing, paused, or stopped. Pretty simple."
"description": "Whether MPD is currently playing or paused. Pretty simple.",
"enum": [
"play",
"pause"
],
"title": "State",
"type": "string"
},
"title": {
"description": "The song's title, if it's been tagged with one. Currently only one title is supported, since it doesn't make a lot of sense to tag a single audio file with multiple titles.",
@ -204,8 +190,6 @@
},
"required": [
"state",
"queue_index",
"queue_length",
"file",
"title",
"artist",