[WS] Last.fm

Mp3tag v2.38 or higher required

How do I install the script? / Wie installiere ich das Script?

4 Scripts:
* Import Artist picture as cover (small)

  • Import Artist picture as cover (big)
  • Use first artist top tag as genre
  • Use first 3 (or more) artist top tags as genre

lastfm.zip (2.58 KB)

1 Like

Thanks for this script.
Now it's much easier to get proper artist-images. :slight_smile:

Thanks for this script.

I still got a question. Is it possible to import not only the first but maybe the top 6 tags in a field called "tags". Maybe with a count of 30 as the condition for the script. The genre should be seperated by ";" or ",".

I don't like the idea of only having one genre per artist and I don't have any idea how to write more than one genre in the "tags" field


So I am trying to use this script, but all it does it bring up a box for me to "Adjust Tag Information" - in which all the fields are blank.

Am I doing something wrong? :stuck_out_tongue:

OK, so I am using a different artist and I can kind of see how it works now.

My only problem now is - it's finding an image of the band, but if I click "OK" (with the "Save Image To Tag" option enabled), it saves it as the "Cover Image" not the "Band Image".

I can see this because I use a shell extension called "MP3-Info".

Any ideas?

This can't be changed at the moment but it's on my internal wish list.

Is it possible to write the results of this script with leading upper cases, like it is in the dropdown field? Otherwise there are different forms of the same genre, like:

Rnb --> R&B
jazz --> Jazz

... and so on.

Hey, this is really nice!

Nevertheless, I have some suggestions/wishes. Is it possible to search for Genre-Tags based on %album% not on %artist%. I guess this makes more sense. Furthermore, I would like to opt for the top three tags. They should be added as genre-Tags, e.g. genre=Tag1, genre=Tag2, genre=Tag3.

Not mention rewrite rules (capitalization) --- one could do that afterwards by appropriate actions.

I looked at the code and I guess one has to edit http://ws.audioscrobbler.com/1.0/artist/%s/toptags.xml. Would You like to post the XML here? Maybe someone (or even me) can understand and adapt. Or maybe even You feel like coding something :unsure: ?


I added a script with 3 genres, you can also easily adjust the script to use more genres.
Added some auto-capitalization.

I'm not sure if album tags are better. They also contain lots of useless tags, i.e. "albums i own" or are not so much used as artist tags.
Besides these tags are not available with the old api.
And in the new api, an authentication is required for these tags which is not possible with this simple framework.

Thank You! I'm not sure about changing, the script adds three Tags (correct, as wanted), but where is that defined :book: ??

At least I could change the separation paramter from , ' to\\' (escaped as `\'). Now the three Top-Tags result in three Genre-Tags (not only one Tag with a comma separated list of three Genres).

Okay, I didn't know that.

Thank You for scripting! :slight_smile:


Thanks for your all your scrips, they are time savers like nothing else...

I cannot, for my life, get the 6 Top tags that I want by changing in your script. Where do I need to write the 4 (=6 Tags, right?)

I don't understand what you mean with - while "<tag" 1 # Change second parameter to determine the amount of style tags 1=3 Genres, 2=4 Genres,...

Changing any of the Bold 1's changes the Tag, like it picks another Tag. Changing any of the second 1's does nothing for me...

findinline "" 1 1
if "<tag"

    say ", "
    findinline "<name>"
    sayuntil "</name>"
    findinline "</tag>" <b>1</b> <i>1</i>

You must only change the parameter of while:
while "<tag" 1
while "<tag" 4

:rolleyes: My God, I'm sorry... Thank you.

Any news on this? Would be so awesome! :stuck_out_tongue:

Yes, you can change the cover type via the context menu before saving the cover to the tag.

just installed MP3Tag and I'm quite happy with it. Anyhow I'm missing a feature from a mediamonkey script: Importing genre based on last.fm.

This script almost fits my needs but I still miss two features:

  1. A whitelist with allowed genres: As tags sometimes doesn't are the genre of the artist it would be useful if we could define a list with genres we want. So it should the most used tag which is included in your whitelist. If the most used tag isn't in the whitelist it should check the second most used tag instead and so on.

  2. Modify tags: Sometimes the genres are wrote differenty like RnB and R'n'B. So it would be nice that we could additionally to the whitelist define some tags which should be replaced.

In the MediaMonkey script it's implemented like this: the whitelist conatins "Electro,Pop,Hip-Hop,Rap=Hip-Hop,...". So allowed genres are Electro, Pop and Hip-Hop while Rap should be replaced by Hip-Hop.

Is this possible? I know VBScript but unfortunately this script language works quite differently and you can't use your own variables, right?

Hi Big_Berny, just being a new user of Mp3tag you have to learn how to apply the general functionalities and the specialities of Mp3tag.
Mp3tag offers a bunch of tools to make tagging life easier.
If it goes to special user wishes, which are easy to solve within other open scripting languages, then often it leads to rather complicated think-around-the corner constructions.

Beside some ready to use "Convert" and "Action" dialogs, Mp3tag has it's own scripting language to solve specific user defined tasks. You know VBScript and the learning curve will be not so steap.

Although Mp3tag does not support any white or black lists as you need it, you can use Mp3tag scripting language to make your own lookup function.
If you need a "Variable", then create a user defined tag field with a name of your will, e. g. by using an action "Format value", and fill the tag field with content as you will.
If you want to destroy the variable, then use an action "Remove tag fields".
There is also an action "Import from textfile", which can import a complete text file into a tag field.

Back to your current problem ... you need a lookup table with two columns.
Column1 has the search item (the key), column2 has the target value (the value).

There are examples how you can solve your problem ...

Good luck!


Thanks a lot for your answer.

It looks a bit more complicated than the VBScript-solution from MediaMonkey but I'll try it out next week.


I placed the script in place you specify, however, it does not appear in the source ... Is it a problem of software version (2.49)?
If you could help me it would be really nice!
thank you in advance:)

I managed to get it working finally, I wonder if we can use it more automatic (because an artist by artist with my 50,000 tracks ... it's long).You know like doing something for select all your tracks and making the script auto scan for the artist top genre for all artists ?