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

[Question] bitrate missing in songs #363

Closed
GioF71 opened this issue Nov 9, 2023 · 14 comments
Closed

[Question] bitrate missing in songs #363

GioF71 opened this issue Nov 9, 2023 · 14 comments
Milestone

Comments

@GioF71
Copy link

GioF71 commented Nov 9, 2023

Hello again, when using the subsonic python library py-sonic, I notice that the key 'bitrate' is missing from the 'song' dictionary. Example, when you pick a random song. This information is usually available when using navidrome or gonic.
Would it be possible to add this detail to the data structure?

Thank you

@epoupon
Copy link
Owner

epoupon commented Nov 9, 2023

Yes it is possible to add this!

@epoupon epoupon added this to the v3.44.0 milestone Nov 9, 2023
@GioF71
Copy link
Author

GioF71 commented Nov 9, 2023

Thank you. Will be waiting. Before I open other issuse if this is something not possible... would you consider adding information about the sampling rate and the bit depth? Thanks again

@epoupon
Copy link
Owner

epoupon commented Nov 9, 2023

Well lms uses taglib so this is available: https://taglib.org/api/classTagLib_1_1AudioProperties.html
Looks like bit depth is exposed only for some formats though.
That being said, extra fields should be normalized/adopted at the OpenSubsonic level (see https://github.com/opensubsonic/open-subsonic-api)

@GioF71
Copy link
Author

GioF71 commented Nov 9, 2023

Yes, Bit depth is probably missing for lossy formats (it's meaningless in that case). In any case it would be nice to have these fields exposed when they are relevant for the specific song (as an audio file).

@epoupon
Copy link
Owner

epoupon commented Nov 9, 2023

Yes indeed, but as AFAIU you need these info using the subsonic API?

@GioF71
Copy link
Author

GioF71 commented Nov 9, 2023

Yes I would like them very much, but not only from lms, they should be supported across all the opensubsonic server, in order to be able to build applications that can consistently show that kind of information.

@epoupon
Copy link
Owner

epoupon commented Nov 9, 2023

Ok then you should request these fields at the open subsonic github, I will gladly add them on lms afterwards.

@GioF71
Copy link
Author

GioF71 commented Nov 10, 2023

Ok sure, will do.
Just to confirm, will you be adding the bitrate, which is already in the standard api?
Also the contentType is missing currently, do I need to create a separate issue for this as well?
Thank you!

@epoupon
Copy link
Owner

epoupon commented Nov 10, 2023

Ok sure, will do. Just to confirm, will you be adding the bitrate, which is already in the standard api?

Yes!

Also the contentType is missing currently, do I need to create a separate issue for this as well? Thank you!

I will add it in referring the same issue

@GioF71
Copy link
Author

GioF71 commented Nov 10, 2023

Awesome, thank you!

@GioF71
Copy link
Author

GioF71 commented Nov 11, 2023

I have created this discussion on the opensubsonic repository.
If this is accepted, then it would be also nice to have there informations (maybe in form of a list, considering that some release of the same albums include files with different bitDepth and samplingRates). But in any case, this would come next.
If you have some suggestion for the formulation of the discussion, please comment and I will update it.

Thank you.

@epoupon
Copy link
Owner

epoupon commented Nov 11, 2023

I added the fields in the Subsonic API.
Bitrates were already displayed in the web interface, but now for an album this is the mean bitrate of the tracks, as the bitrate of a track may already be a mean bitrate.

considering that some release of the same albums include files with different bitDepth and samplingRates

About that, several releases of the same albums should be scanned as separate albums by LMS since they have different release MBID, and then they will have different ids in the subsonic API.
I planned to better identify release groups (see https://musicbrainz.org/doc/Release_Group) but I still have to think about a sleek way to expose this concept in the UI.

@GioF71
Copy link
Author

GioF71 commented Jan 13, 2024

Hello, about this discussion on opensubsonic: opensubsonic/open-subsonic-api#64
I do not really understand if I need to do some specific activity there so that it has the chance to become part of the api. I do not understand if the change is accepted or not.
Can you give me a hint? Thank you!

@epoupon
Copy link
Owner

epoupon commented Jan 13, 2024

Hello ! I think since there is no objection, the next step is to make a PR with the proposed changes

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

2 participants