[WS] Last.fm

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

: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.

Hi,
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 ...
/t/4458/1
/t/5660/1

Good luck!

DD.20100417.0736.CEST

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.

Thanks
Big_Berny

Hi,
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 ?

Mein von Dir angepasstes Script "Last.fm#Top Tags 3 Genres_to_FILETYPE" funktioniert nicht mehr. Hat last.fm etwas geändert? Auch "Import Artist picture as cover (big)" geht nicht mehr.

Last.fm changed their site and their API wasn't working for a few days, but now it actually works it just doesn't match any artists.

Can someone more capable than me, check if they've chaned the API?

Ich verstehe den letzten Satz so: Kann jemand, der fähiger ist als ich, überprüfen, ob die API geändert wurde?

Yes :slight_smile:

Hallo Dano,
das o. g. Script funktioniert seit einigen Tagen nicht mehr. Liegt es an mir oder wurde die API von LastFm geändert? Dein Script wurde über 4000mal heruntergeladen. Es müssten also viele User ein ähnliches Problem haben. Im Forum habe ich darauf keinen Hinweis gefunden. Lieber Dano, würdest Du Dein Script 'mal überprüfen?
Gruß Susanne

First of all, thanks for making this script Dano I absolutely love it! Been using it forever now and made tagging so much better!

It is however still not working sadly :frowning:

Anyone have any idea how to get it working again, missing it very much.

Regards,

Fuzzed :music:

Ich möchte mich nochmal in Erinnerung bringen mit meiner Frage nach einer neuen Version lastfm.zip. Ist es so, dass lediglich die Schnittstelle von lastfm einseitig geändert wurde oder dass überhaupt kein Zugriff auf die lastfm-Datenbank möglich ist. Kann jemals mit einem neuen Script Use first 3 (or more) artist top tags as genre gerechnet werden?

Für Picard gibt es ein Plugin, das drei Genres unterstützt und intern mit der last.fm API v2.0 arbeitet. Download (Letztes Update: v0.14 vom 25. Nov. 2015)

Angenehmer Seiteneffekt: Man umgeht die Probleme mit dem MusicBrainz Web Source Script

Da ich auch weiterhin das Web Source Script für Metal Archives nutzen will bzw. muss, weil es kein MA Plugin für Picard zu geben scheint, ist es zumindest für mich ein sowohl-als-auch: Erst Picard, dann mp3tag - leider

Hello, uisng mp3tag 2.79 and wants to update also the genre tag with last.fm.
Unfortunaltely last.fm script does not work any longer.
Any update is appreciated.

Confirmed, running v2.9 and last.fm source dead here also
Please update

Hey mates, someone explained to me how to fix the script, I only applied it to the 'Last.fm#Top Tags 3 Genres.src' script but it should work similar for the others (1 genre, artist pic, etc.) Open it with Notepad++ or something similar to edit and save.

Improved: Last.fm#Top Tags 3 Genres.src

# Mp3tag (2.38 or higher) Parsing for Last.fm by dano
# Save it in your Mp3tag data directory, 
# e.g. C:\Documents and Settings\*username*\Application Data\Mp3tag\data\sources
#
#	DO NOT COPY/MODIFY AND REDISTRIBUTE THIS WITHOUT PERMISSION
#
#   Get the first 3 Top Tags as Genre to categorize your music
#
[Name]=Last.fm TopTags
[BasedOn]=www.last.fm
[AlbumUrl]=http://ws.audioscrobbler.com/2.0/?method=artist.gettoptags&artist=%s&api_key=YOUR_API_KEY
[WordSeperator]=+
[SearchBy]=$replace(%artist%,/,'%'252F,&,'%'2526)
[Encoding]=url-utf-8

[ParserScriptAlbum]=...
# ###################################################################
#					A  L  B  U  M
# ###################################################################
#debug "on" "C:\debug_Last.fm-Artist-TopTags_B.html" "20"

joinuntil "</toptags>"

regexpreplace "(?<=<name>)(\l)" "\u$1"
regexpreplace "\s(\l)" " \u$1"
regexpreplace "-(\l)" "-\u$1"

outputto "Genre"

findinline "<name>"
sayuntil "</name>"
findinline "</tag>" 1 1
if "<tag"
    do  
        say ", "
        findinline "<name>"
        sayuntil "</name>"
        
        findinline "</tag>" 1 1
    while "<tag" 1 # Change second parameter to determine the amount of style tags 1=3 Genres, 2=4 Genres,...
endif

Line 11 was changed, the only thing you need to do is insert your personal API key where it says 'YOUR_API_KEY' on line 11. You can register or login to Last.fm and obtain one here: http://www.last.fm/api/account/create

Only Contact email and Application name are required, and can be filled out with whatever you like. You do not need to access the provided email account to verify anything. Click Submit and copy/paste the API Key over YOUR_API_KEY in the line above

Good luck with it! It worked for me, it should for you. Am a happy man today.

Explanation by person that helped me: