[WS] RateYourMusic

You can create a local copy of the website or the API data. Then you can test as many times you want and need to fix this Web Sources Script.

Phew, it wasn't easy to dive back into the web sources framework after all these years.

You can create a local copy of the website or the API data. Then you can test as many times you want and need to fix this Web Sources Script.

Not a bad tip, but there is no API on RYM... :slight_smile: I did manage to do something with static HTML pages for the album details, but for some reason mp3tag returned a 404 error when I tried to do that for the search.

Anyway, I was able to get something working with a few examples (regular, with discs, split album, various artists, non-latin artist name...). Here is the update:
Dropbox - RateYourMusic 5.0
If you encounter any issue, let me know, I probably missed some cases.

Thanks so much for doing this. So far it's worked for everything I've thrown at it.

I think I messed up the Various Artists, I'll look into it with a fresher brain over the weekend.
But if it's already working well enough with the rest, that's a good start. :slight_smile:

Thanks for your script.

So far I've done copy and paste with UI.Vision RPA, but it looks easier with mp3tag.

I would like to get these 4 tags:

  • Primary genres
  • Secondary genres (in a separate tag)
  • Descriptors
  • Artist genres (on the artist page).

For the first three, I modified your script, (I don't know what it's worth, I don't know anything about it, but it seems to work).
I changed the separator from "; " to "\\" so that it's several values instead of one.
https://paste.myst.rs/nw8julte

I would like to have Artist genres (on the artist's page). I have started to modify the script to look for the artist's page, but it is too complicated for me.
Is it possible to get Artist genres in this script or with another one?

Hi User_name,
I don't mind at all adding what you propose, but may I ask why you use "\\" as separator instead of ";"?
Is it the separator used by a particular music software, or is it broadly used?

After years with foobar2000 I switched to MusicBee. MusicBee and foobar both use ";", so I've assumed it's the most common...

This "; " is also used in WMP, as well as several mobile player apps.

Good to know. In that case, I'll stick with ";" to suit most people's needs, and User_name you can edit for your own needs. Sorry!

Here is version 5.1 with those 3 new tags. From User_name's code, I just also changed "RYM ..." into "RATEYOURMUSIC ..." to match the others that are already added by the script.
This version also fixes the issues I encountered in Various Artists (for example Kill Bill vol.1 wasn't working at all).

Dropbox - RateYourMusic 5.1

As for getting Artist genres from the artist's page, I'll look into it. A workaround to the "index then album" workflow might be to make a separate script pretending that the artist's page is the album page, and get the artist's tags like that.

Stay tuned... :nerd_face:

To the best of my knowledge, this is only used by mp3tag as an internal modifier to split the artist fields when saving. I am not aware of any players or servers that use "\\" as a default separator.

Thanks for your improvements and answers.

Yes, I think that "\\" is the multi-field separator used by Mp3tag (unless it's a setting ? but I didn't find it).
Look at the difference between "your" tag with a semicolon and "mine" with two backslashes. This is the Extended Tags panel of Mp3tag. This result is obtained with version 5.1 of your script.

The semicolon is not interpreted as a separator by Mp3tag. If there are several values they are all in one, and (unless I'm mistaken) that's what the other players will see.

I know that ";" is the separator of foobar2000. I think the difference is not well visible in foobar2000, in both cases foobar shows the values on one line with semicolons.
In foobar2000, if I modify a Genre value for a file: I add a space, I save, I remove this space, I save. Then I compare with the other tracks of the album : it should be the same. However foobar says «multiple values»: the results are different. Foobar has split the values during saving and on the other files (tagged with your script with the semicolon separator) the values are not split.

Here's all I found in the documentation:
https://docs.mp3tag.de/getting-started/main-window/#multiple-fields
https://docs.mp3tag.de/customization/file-list/#editing-columns
Otherwise there are several topics on the forum.

I use foobar2000 with this: Search-by-Distance-SMP. It makes a difference with this.

This really depends on the media manager and player of choice for each user. Many do not support the separated multiple fields like you are showing in that screenshot. Many other players prefer the single line separated by the semicolon "; " used in the script. But if that is your preference, you can use the action Split Field By Separator and define it with the ; to get them this way after running the script.

Yes, you are right. As nathbot said, I can also edit the script so either way it is ok for me.

Good idea, I hadn't thought of that.
I did this in a second script, and it seems to work.
Here's what I did: https://paste.myst.rs/v0yeqll4

I'm happy. Thank you!

@User_name thanks for the explanation for your use of "\\", and for the snippet to get the artist's genres.
I incorporated it into a separate "Search artist data" script, which searches by the artist's name.

It also gets the artist's country in a "COUNTRY" tag, I thought some people might have a use for that.

Dropbox - RateYourMusic 20221025

(using dates seems easier than keeping track of versions, especially if there are 2 scripts now...)

It's much better with the first index window for artists. It's a great job. Thanks a lot.

I saw this, I don't know if it's intentional: line 150, there is no space after the semicolon separator, while there is one on the other script, ";" instead of "; ".

Not intentional! I added the missing space and updated the zip above.
Well spotted :slight_smile:

There is an error with the code I gave if there is no secondary genre on the album page.
I started over and copied the code that was already there.
Here's what it looks like: https://paste.myst.rs/i61pejs7
I think the Descriptors line is there all the time, even if it's empty. So no need for an "if" for this one.

Update:
RateYourMusic 2022-11-06

It integrates the fix from User_name on separate RYM primary/secondary genre tags,
fixes an issue I encountered with an album where the "Released" date had no link tag on the year,
and fixes a bug when getting artists in some Various Artists releases.

I was wondering if it is possible to have the genre field just display the first genre if that is possible.

@nathbot Thanks for your work on the script !

I can't get it to work, though.

If I search the album I get : ERROR(L96): unknown command 'killtag'
If I search the artist data, I get : ERROR(L39/findinline): text not found.