tamland / python-tidal

Python API for TIDAL music streaming service
GNU Lesser General Public License v3.0
413 stars 110 forks source link

Media metadata #169

Closed jozefKruszynski closed 1 year ago

jozefKruszynski commented 1 year ago

Tidal appear to have made some unexpected changes when adding HI_RES FLAC. It is possible that a given track is available as LOSSLESS, HIRES_LOSSLESS or MQA or combination of these. This is only visible in the mediaMetadata::tags array within the json response from tidal.

The change I am proposing here is simply that we add this tags array to the parsed track object, enabling us to then potentially choose which version of the track we want to use for streaming.

I am currently making the assumption that we can use either MQA, LOSSLESS or HIRES_LOSSLESS as part of our request, but I have not confirmed this.

If the current version of the PR is not acceptable, perhaps it can serve as a base for an idea of how to better make this selection of audio versions.

tehkillerbee commented 1 year ago

This works as expected. Approved if no-one else objects.