Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] RetrieveItem's audio_url field dynamic behavior #173

Open
gnuletik opened this issue Apr 8, 2020 · 0 comments
Open

[server] RetrieveItem's audio_url field dynamic behavior #173

gnuletik opened this issue Apr 8, 2020 · 0 comments
Assignees
Milestone

Comments

@gnuletik
Copy link
Collaborator

gnuletik commented Apr 8, 2020

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).

@gnuletik gnuletik added this to New in WASABI via automation Apr 8, 2020
@yomguy yomguy assigned yomguy and unassigned Tointoin Jan 24, 2023
@yomguy yomguy added this to the 1.2 milestone Jan 24, 2023
@yomguy yomguy removed this from New in WASABI Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants