mopidy / mopidy-local-sqlite

DEPRECATED (Mopidy SQLite local library extension)
https://mopidy.com
Apache License 2.0
30 stars 10 forks source link

[Question] MusicBrainz MBID #81

Closed jaedb closed 8 years ago

jaedb commented 8 years ago

I'm building a web client for Mopidy Spotmop but am having trouble implementing user-friendly browsing of local files.

The challenge currently is finding a way to manage the relationships between artists, tracks and albums. The perfect outcome would be to display artists and albums like the rest of the interface (with supporting artwork, ratings, etc). I thought I could achieve this by using the MBID.

However, I can't seem get the MBID from the local database. How do I do this? I've already enabled both use_artist_mbid_uri and use_album_mbid_uri switches. I've tried reverse-hashing the uri (ie 94800574623098170cd93f3d578eb979) with no luck.

I get the feeling I'm missing something really obvious...

tkem commented 8 years ago

Mopidy data models contain the musicbrainz_id field, as documented here: http://mopidy.readthedocs.io/en/latest/api/models/ So no need to try and extract that from the URI, which is an implementation detail and subject to change, anyway. For local tracks, your files must contain appropriate MBID tags that can be imported when running mopidy local scan. This usually means that you have to tag your files using beets or Picard, or some other software that can add MBID tags to your media files. Maybe that's the "obvious" thing missing here ;-)

jaedb commented 8 years ago

Ah-hah, that's the missing piece of the puzzle. I mistakenly assumed that mopidy local scan fetched and stored the musicbrainz_id value. Totally makes sense that it is already stored in the file itself.

PS. Thanks for the quick response!