mopidy-tidal
mopidy-tidal copied to clipboard
Add Bitrate, Bitdepth and Decoder information to playing track
Add track technical metadata (bitrate, bitdepth, decoder) to the track model exposed via the API
See also here : https://github.com/jaedb/Iris/issues/808
Using Mopidy-tidal (0.2.7) as a backend I get this:
{
"id" : 1,
"jsonrpc" : "2.0",
"result" : {
"__model__" : "Track",
"album" : {
"__model__" : "Album",
"artists" : [
{
"__model__" : "Artist",
"name" : "Amy Winehouse",
"uri" : "tidal:artist:15796"
}
],
"name" : "Back To Black",
"uri" : "tidal:album:2798956"
},
"artists" : [
{
"__model__" : "Artist",
"name" : "Amy Winehouse",
"uri" : "tidal:artist:15796"
}
],
"disc_no" : 1,
"length" : 240000,
"name" : "Back To Black",
"track_no" : 5,
"uri" : "tidal:track:15796:2798956:2798961"
}
}
Which means that bitrate is not exposed by the backend ?
@BlackLight Do we have additional fields (bitrate etc.) exposed by tidalapi v0.7.x?
No, sadly, although we do have replay_gain
!. In the long run it would be nice if mopidy itself were replay-gain aware.
Here's a random track:
>>> vars(tracks[0])
{'session': <tidalapi.session.Session at 0x7f65b664c730>,
'requests': <tidalapi.request.Requests at 0x7f65b58e8cd0>,
'album': <tidalapi.album.Album at 0x7f65b58ea200>,
'id': 66236919,
'name': 'Electric For Life',
'duration': 28,
'available': True,
'tidal_release_date': datetime.datetime(2016, 10, 21, 0, 0, tzinfo=tzutc()),
'user_date_added': None,
'track_num': 1,
'volume_num': 1,
'explicit': False,
'popularity': 0,
'artist': <tidalapi.artist.Artist at 0x7f65b58e9c30>,
'artists': [<tidalapi.artist.Artist at 0x7f65b58ea560>],
'type': None,
'artist_roles': None,
'replay_gain': -9.88,
'peak': 0.891325,
'isrc': 'NLF711608256',
'copyright': 'Garuda under exclusive license to Armada Music B.V.',
'audio_quality': <Quality.lossless: 'LOSSLESS'>,
'version': 'Intro'}
Audio quality is an enum. Per the linked issue Mopidy's track model only supports bitrate anyhow, so I don't think we could add the other data, even if tidalapi provided it. @orenskl you might want to open with tidalapi?
Done.
https://github.com/tamland/python-tidal/issues/114