Hi
I wanna make a program that takes song names and artists from an excel sheet and adds genres (1 - 3) to the same row according to the song.
For this i’d like to use the LastGenre plugin, but i am a noob tbh and don’t understand the woring of it/ how to implement or even use it.
Can you explain a bit more? You might not need beets itself for this.
Can you make a mockup in Excel of 3 lines of what the results would look like? And paste that here as a screenshot?
Honestly, it sounds like a big project for a novice user. I’ll explain what you can do, but it might sound like gibberish. We have a doc for it but I find it confusing: Writing Plugins — beets 1.6.0 documentation
You might be able to just copy the lastgenre folder into your own folder, and build python code around it.
Or, you could use lastgenre to look up every track in your beets database. once you’ve done that, you could export a CSV (excel compatible) with every track in your db and their top 3 genres. you could do this by copying your beets.db database to a fresh file, and opening it with DB Browser (SQLite).
you can even use beets queries to subset the list, or SQL; whichever is easier for you.
if you wanted a list of every song except the beatles it would be something like this in SQL:
select * from table
where lower(albumartist) not like “%beatles%”
or if you just want techno, something like this (not sure how the syntax is exactly)
Hi,
First of, my apologies for the late reply.
Secondly, a bit more explanation:
the program should look up the song name and artist (column A and B) and paste the 3 most popular genre or tags in column D, E & F (see picture)
How it does that doesn’t matter, but it should be the genre linked to the song. By that i mean: f.e. last.fm has genres linked to songs, spotify has genres linked to the artist.
See if there’s any other APIs in Python for the Last.fm genres. They will be simpler than editing a beets plugin to work outside of it. You could also try musicbrainz which should have genre tags and has a robust and well documented API.
If there are none, do what I said:
You might not need beets itself for this. …
Honestly, it sounds like a big project for a novice user. I’ll explain what you can do, but it might sound like gibberish. We have a doc for it but I find it confusing: Writing Plugins — beets 1.6.0 documentation
You might be able to just copy the lastgenre folder into your own folder, and build python code around it.