User:Kuno/ws/js/tracklist: Difference between revisions
From MusicBrainz Wiki
Jump to navigationJump to search
(New page: Hello Oliver! I think I want to render disc format and title as part of the collapsed discs, so they don't need to be included in a /ws/js call for the tracklist tab. If I also include t...) |
m (Bot: Fixing double redirect to Development/ws/js) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
#REDIRECT [[Development/ws/js]] |
|||
Hello Oliver! |
|||
I think I want to render disc format and title as part of the collapsed discs, so they don't need to be included in a /ws/js call for the tracklist tab. If I also include the tracklist id when rendering the collapsed discs, I can just call: |
|||
/ws/js/tracklist/<tracklist-row-id> |
|||
And the response should be something like this: |
|||
{ |
|||
"format": 1, # format id |
|||
"title": "", # disc title, if any. |
|||
"tracks": [ |
|||
{ |
|||
"length": "4:03", # track length, preferably already formatted. |
|||
"title": "the Love Bug", # track title. |
|||
"artist": { |
|||
"preview": "m-flo♥BoA", |
|||
"names": [ |
|||
{ |
|||
"gid": "22dd2db3-88ea-4428-a7a8-5cd3acf23175", |
|||
"name": "m-flo", |
|||
"credit": "m-flo", |
|||
"join": "♥", |
|||
}, |
|||
{ |
|||
"gid": "a16d1433-ba89-4f72-a47b-a370add0bb55", |
|||
"name": "BoA", |
|||
"credit": "BoA", |
|||
"join": null, |
|||
} |
|||
] |
|||
} |
|||
} |
|||
] |
|||
} |
|||
further notes: |
|||
* the artist/recording lookups may use the external search, which uses GIDs instead of row ids, so for consistency it seems better to not use row ids in these json responses. |
|||
* including the artist credit preview isn't technically neccesary, we have code in javascript anyway to render artist credits, so you can leave it off if you prefer. |
|||
* if you want to name certain keys differently because of consistency with the database or the perl code, be my guest. |
Latest revision as of 20:25, 9 September 2012
Redirect to: