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

Clarify unit prefix for Track.bitrate #1514

Open
tkem opened this issue May 20, 2016 · 3 comments
Open

Clarify unit prefix for Track.bitrate #1514

tkem opened this issue May 20, 2016 · 3 comments
Labels
A-docs Area: Documentation

Comments

@tkem
Copy link
Member

tkem commented May 20, 2016

According to the docs [https://docs.mopidy.com/en/develop/api/models/#mopidy.models.Track], Track.bitrate is supposed to be in kbit/s. Browsing my local media collection using the file backend, bitrates are reported in bit/s, though.

AFAICS, the bitrate property is set from the Gst.TAG_BITRATE value in https://github.com/mopidy/mopidy/blob/develop/mopidy/audio/tags.py#L109, which is given in bit/s according to https://developer.gnome.org/gstreamer/stable/gstreamer-GstTagList.html#GST-TAG-BITRATE:CAPS.

Given that it's usually easier to change the documentation than the source, and that I can't see any added value in rounding this to kbit/s, I'd suggest changing the docs to reflect existing practice. The question is if this affects any extensions, and if/how this change should be communicated.

@tkem tkem added the A-docs Area: Documentation label May 20, 2016
@jodal
Copy link
Member

jodal commented May 21, 2016

Mopidy-Spotify sets track.bitrate in kbit/s, e.g. 160. Thus, this sounds like a bug in Mopidy-File.

@tkem
Copy link
Member Author

tkem commented May 22, 2016

AFAICS, this also affects the local backends. I was just leaning towards changing the docs, since it feels more "natural" and less error-prone for extensions to get it right (see linked issues). However, I'd be happy either way, as long as this gets clarified.

@tkem
Copy link
Member Author

tkem commented Jun 28, 2016

Any new thoughts on this? Either way is fine with me, I think we should just aim for consistency...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation
Projects
None yet
Development

No branches or pull requests

2 participants