Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Help with a titleformat script to find any album with Rateyourmusic (Read 1542 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help with a titleformat script to find any album with Rateyourmusic

Hey all, trying to make a script that's a foolproof as possible that can link to albums on Rateyourmusic.com to use in conjunction with my "Run Command..." plugin.

Currently I have this

Code: [Select]
"https://rateyourmusic.com/release/album/$lower($replace(%album artist%, ,_))/$lower($replace(%album%, ,_))"

However, Rateyourmusic's URLs don't like any kinds of punctuation, so no commas, periods, apostrophes, colons, etc. It's ok with dashes though...

Example: https://rateyourmusic.com/release/album/deaths-dynamic-shroud_wmv/endless-vi-void-complex/

Additionally RYM also adds a part to the link if the album is actually an EP, example: https://rateyourmusic.com/release/ep/stellardrive/ers-2/

I do have this info stored in my files as well with %MUSICBRAINZ_ALBUMTYPE% which will tag the field with "EP" if it is.


All this is to say... I am way too dumb with Title Formatting to make an end all be all script that will work MOST of the time (I realize there will probably be corner cases where it still won't work just because RYM's linking is kinda picky) when trying to easily link to an album for review/research purposes.

Would any of the title format whizzes here be able to help me out? Would be much appreciated.

Re: Help with a titleformat script to find any album with Rateyourmusic

Reply #1
I've been using this for ages:

Code: [Select]
https://rateyourmusic.com/release/album/$lower($replace($ascii(%artist%),!,_,.,_,$char(32),_,&,and,é,e,à,a,è,e,á,a,$char(40),_,$char(41),_,-,_,$char(39),))/$lower($replace($ascii(%album%),!,_,.,_,$char(32),_,&,and,é,e,à,a,è,e,á,a,$char(40),_,$char(41),_,-,_,$char(39),))

However, RYM url's aren't consistent so this won't always work. If an artist name is more than a single word, separation is either _ or - although most url's use _ but newer artists all tend to use - to separate words in url's.

Re: Help with a titleformat script to find any album with Rateyourmusic

Reply #2
Thank you! Better than nothing!

Re: Help with a titleformat script to find any album with Rateyourmusic

Reply #3
Additionally RYM also adds a part to the link if the album is actually an EP, example: https://rateyourmusic.com/release/ep/stellardrive/ers-2/
I do have this info stored in my files as well with %MUSICBRAINZ_ALBUMTYPE% which will tag the field with "EP" if it is.

For the "album or ep" part of the URL, you could test the MB field you have tagged for whether it contains "EP" -

Code: [Select]
$if($strstr(%MUSICBRAINZ_ALBUMTYPE%,EP),ep,album)

So including that -

Code: [Select]
https://rateyourmusic.com/release/$if($strstr(%MUSICBRAINZ_ALBUMTYPE%,EP),ep,album)/ ...

... followed by the rest of the URL code posted above.

(Mind you I have not tested this, but theoretically it should put "ep" in the URL when tagged, and if not "album")