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

Add Bitrate, Bitdepth and Decoder information to playing track #54

Open
orenskl opened this issue Feb 19, 2022 · 3 comments
Open

Add Bitrate, Bitdepth and Decoder information to playing track #54

orenskl opened this issue Feb 19, 2022 · 3 comments

Comments

@orenskl
Copy link

orenskl commented Feb 19, 2022

Add track technical metadata (bitrate, bitdepth, decoder) to the track model exposed via the API

See also here : jaedb/Iris#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 ?

@tehkillerbee
Copy link
Owner

@blacklight Do we have additional fields (bitrate etc.) exposed by tidalapi v0.7.x?

@2e0byo
Copy link
Collaborator

2e0byo commented Sep 12, 2022

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?

@orenskl
Copy link
Author

orenskl commented Sep 12, 2022

Done.

tamland/python-tidal#114

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