Genre

44 views
Skip to first unread message

RyanR

unread,
Jul 14, 2011, 8:35:49 PM7/14/11
to beets
Hi there,

I set up beets with the lastid plugin. It seems to detect the track
title and artist name ok most of the time. However I can't get it to
show the genre in the DB. Is this not implemented? It is badly
required for this project to work properly. I just can't seem to
figure it out, I am not very good with Python yet.

The only modification I have made is to make it select the first match
it finds rather than ask for user input.

Any help would be very much appreciated =)

Ryan

Adrian Sampson

unread,
Jul 15, 2011, 6:18:25 AM7/15/11
to beets...@googlegroups.com
> However I can't get it to
> show the genre in the DB. Is this not implemented?

Beets gets its metadata from MusicBrainz, and MusicBrainz does not
have genre information. See:

http://musicbrainz.org/doc/General_FAQ#Why_does_MusicBrainz_not_support_genre_information.3F

It's been proposed that genres might be inferred from last.fm tags or
something like that. Issue #139 tracks that:

http://code.google.com/p/beets/issues/detail?id=139

"Star" that issue to vote for it and to keep track of progress. I'd
love to hear people's thoughts about how exactly that should work.

Adrian

RyanR

unread,
Jul 15, 2011, 1:20:09 PM7/15/11
to beets
If getting the lastfm tag is the easiest way then I will do that. I
just have to figure out how exactly. If nobody is planning to do it
any time soon then I will have to do it because it has to be done
ASAP. So since I don't know Python very well (I have never made
anything with it) this is a bit of a challenge but I usually like a
good challenge.

Another thought that crossed my mind about the MB situation is to just
set up a voting interface so people can vote on the proper genre.
People could enter in their own or it could pick up automatically from
the files meta data for tracks. Then if people don't like the genre
it's in they can add or vote for a different one. After a set number
of votes the genre could be locked in as an appropriate genre for that
track. This would probably even be fairly easy to create.

However it does not help me in my present situation. By the sound of
it the best option is to create a beets plugin to add the genre from
lastfm. Maybe copying the lastid plugin would be a start and just
modify it to get the genre rather than title and artist. Though
perhaps it would have to use some different API calls. It looked like
maybe the query it was doing only returns the basic info with a lastfm
id. But perhaps it could be expanded upon or maybe it already is. I
just don't know. Maybe there is a magical way to learn Python =)

On Jul 15, 6:18 am, Adrian Sampson <adrian.samp...@gmail.com> wrote:
> > However I can't get it to
> > show the genre in the DB. Is this not implemented?
>
> Beets gets its metadata from MusicBrainz, and MusicBrainz does not
> have genre information. See:
>
> http://musicbrainz.org/doc/General_FAQ#Why_does_MusicBrainz_not_suppo...

Adrian Sampson

unread,
Jul 15, 2011, 6:28:14 PM7/15/11
to beets...@googlegroups.com
> By the sound of
> it the best option is to create a beets plugin to add the genre from
> lastfm. Maybe copying the lastid plugin would be a start and just
> modify it to get the genre rather than title and artist. Though
> perhaps it would have to use some different API calls. It looked like
> maybe the query it was doing only returns the basic info with a lastfm
> id.

Yes, the lastid plugin only does fingerprint lookups, no metadata gathering. For the full last.fm API, you may be interested in the "pylast" Python module:

http://code.google.com/p/pylast/

It looks well-designed and up-to-date.

RyanR

unread,
Jul 15, 2011, 6:41:59 PM7/15/11
to beets
Actually I almost have it done I think =) Figured out python. Now I
have modified the lastfp plugin to include a couple functions to query
tags and parse them. And then modified the lastid plugin to work with
that a bit. For some reason though it is only returning the artist
mbid and not the track mbid. So I am not entirely sure what to do with
that but I hope I can figure something out.
Reply all
Reply to author
Forward
0 new messages