mopidy / mopidy-beets

Mopidy extension for playing music from a Beets collection
https://mopidy.com/ext/beets/
MIT License
49 stars 14 forks source link

Use 'year' instead of/as well as 'date' for metadata? #5

Closed fatg3erman closed 8 years ago

fatg3erman commented 11 years ago

I'm running the latest beets, and when I do a query through mopidy-beets none of the tracks have date information, even though I've tagged them using beets. I investigated and found that mopidy-beets is looking for a 'date' field in the JSON data. My version of beets doesn't return a 'date' field but it does return a 'year' field. (Perhaps this is due to me having the beets option 'original_date' set to 'yes'?)

Changing mopidy-beets to use the 'year' field to fill in the 'date' field in the track information resolved the issue for me.

jodal commented 8 years ago

This is a good match for the spec of Mopidy's Track.date, ref https://docs.mopidy.com/en/latest/api/models/#mopidy.models.Track, which accepts either a year or a full ISO-8601 date:

date (string) – track release date (YYYY or YYYY-MM-DD)

sumpfralle commented 8 years ago

@jodal: thanks for the hint regarding the date format. Beets' date (year, [month, day]) is now translated to Mopidy's object attribute: 7bf00a078d46d05f163679600c46e0e9bb82333f Proper search behaviour was added recently, as well: e123032c5cadea8ebae54b52f006502e29e02bc9