You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[server] RetrieveItem's audio_url field dynamic behavior #173
When retrieving an Item through the API, the audio_src field already includes the mp3 and ogg keys. #172 should add flac key.
We want to avoid providing a MP3 file encoded with flac because it would be a waste of bandwidth.
So, we expect the flac field to be defined only if the source file is a lossless format.
Some clients could expects a flac file to always be defined (if the client only works with flac).
In order to work around this use-case, we can add a query parameter to the route to force specific encoding.
The URL would look like this:
$ curl /timeside/api/items/f819b56c-e4c4-4762-83ac-77eb81084268/?forceEncoding=flac,mp3,ogg
# Expect audio_url.flac, audio_url.mp3 and audio_url.ogg to be defined
$ curl /timeside/api/items/f819b56c-e4c4-4762-83ac-77eb81084268/?forceEncoding=mp3
# Expect at least audio_url.mp3 to be defined
It would be nice to add some docs about this behavior (probably in the description field of the schema).
Activity