[WS] Apple Music

Thanks, I've decided to remove the comments field all together as it contains no data to begin with. Thank you for the kind help.

A post was split to a new topic: Remove time stamp from date

To get the maximum quality you can replace this part of the script

json_select "url"
RegexpReplace "(.*)\/.*" "$1"
SayRest
# Width x Height - JPEG Quality
Say "/2400x2400-50.jpg"

with

json_select "url"
IfNot ""
	Replace "://is" "://a"
	Replace "-ssl.mzstatic.com/image/thumb/" ".mzstatic.com/us/r1000/0/"
	RegexpReplace "(.*)\/.*" "$1"
	OutputTo "COVERURL"
	SayRest
EndIf
1 Like

If you don't want the script to write to the comment, remove or add # in front of the lines between
OutputTo "COMMENT" and Say "|"

If you want to swap TITLE and TITLESORT, you can just swap OutputTo "TITLE" and OutputTo "TITLESORT" in the script.

1 Like

Thanks bud, appreciated.

Thanks for this. This effectively solves what I was looking for.

I’m having trouble in getting it to display artist like apple music does: artist, artist & artist.

Used to work like that before, anyway to keep it unchanged? I’ve only managed to get everything in commas or everything in &.

Thanks in advance!

What about this reply?

1 Like

My issue got resolved after replacing the .INC file I had with a fresh copy from the most recent version of the script.

On your version does the field "ITUNESPURCHASEDATE" show up? I downloaded 3.4 and I still have to input the date myself?

@mirogeorgiev97 replacing the file changed the (feat. artist) to the title name instead of going directly to description / comment?

@Lukriax @zhordon

I'm not a dev, so this is just a best effort based on AreDigg's comments, but it seems to work as expected for me.

=================================
# Script by "AreDigg". 
# Code for most edits are also taken from "AreDigg" forum posts about this web source. 
# Edited by "Arbiter" on 20230102. 
# Edits do the following:
# 1. Discontinues separating "title" into the TITLE and COMMENT tags
# 2. Sets complete "title" to both TITLE and TITLESORT tags
# 3. Discontinues editing Album to remove items such as "(Single)"
# 4. Attempts to set "comment" into the COMMENT tag (unclear if "comment" is availalbe in source data)
# 5. Adds "audioLocale" to LANGUAGE tag
# 6. Retrieves full size cover art
=================================

I hope that helps.
Apple Music for MP3Tag v3.4 (Arbiter Edits).zip (43.4 KB)

2 Likes

Regarding point 4, "Attempts to set "comment" into the COMMENT tag (unclear if "comment" is [available] in source data)," it does nothing to the COMMENT tag, suggesting that "comment" is not available in the source data.

Many thanks, your contribution is highly appreciated.

Everything works as intended. No errors anywhere.

Thank you from the core of my heart friend. May God bless you.

@mirogeorgiev97 think that is correct that "comment" is not in the JSON data, but I'm not certain. So, I just gave it a shot. It shouldn't do any harm at the very least. Somewhere I saw mention that some classical albums may have a comment tag in Apple's catalog. Though that might be using the iTunes API or something else.

@ceo54 You're very welcome. AreDigg, did all of the hard work. I just did a little bit of tweaking and even most of those tweaks were pulled from his comments—but thank you for the blessing. God bless you as well.

2 Likes

Finally got around to trying this out, covers what I was looking for. Thanks again for your contribution.

1 Like

Does this script still work? I noticed that there was an update on 26 December 2022, but I'm still getting the same error that was happening prior to the update.

Yeah, it has been updated. Check the pinned post.

Thank you! I had to reinstall MP3Tag to get it working. Not sure what was I was doing wrong originally but it's working flawlessly now.

Hi all-- very pleased to find this script. Thank you to @AreDigg and others who have contributed.

My goal would be for the script to produce tags that are indistinguishable from tags on songs added to my library via Apple Music itself (and in the same style/format). I have a mix of music I've ripped myself from CDs (via FLAC->ALAC->iTunes Match) and music I just download from AM and I would like Artists, genres and other tags to be as consistent as possible so my library feels cohesive.

My first question was about why information in parentheses from the title field was going into the comment field, but I've already found the discussion on that and seen the updated script @Arbiter has provided to fix it.

I'm wondering about genres. As far as I can see, none of my iTunes purchases or tracks I've downloaded from Apple Music has multiple genres, yet when I try to use this script to tag files with Apple Music metadata all or most of it ends up tagged with multiple genres, separated by two backslashes (e.g. Electronica\\Electronic). Does Apple Music's metadata actually provide multiple genres even though Apple's music apps (iTunes/Music.app) only display one? If so, how could I modify the script to only save the top genre (the one that would be displayed if that album were to be displayed directly in Apple Music?

I see the discussion above about swapping TITLE and TITLESORT, but when I look at the extended tags in mp3tag from an album I purchased directly from iTunes, I don't even see ALBUMSORT ARTISTSORT or TITLESORT tags. I know that iTunes/Music.app honors these fields though, because I used to tag ARTISTSORT as Lastname, Firstname. But I notice that anything I've downloaded from Apple Music is sorted Firstname Lastname (just like how it would appear in the ARTIST tag), so I'm thinking that if I want to tag my own music exactly as it would be tagged by Apple Music then I shouldn't use any of the SORT tags, right?

Someone mentioned above that when you have multiple artists in the Artist field, iTunes/Music.app displays this as Artist 1, Artist 2 & Artist 3. Is it possible to have the script format it that way, or is the only way to address that after the fact with an action?

From my recollection, iTunes/Apple Music doesn't embed cover art in the tracks themselves--is that right? So given that I don't intend to use these files in any non-Apple music organization/playing apps I shouldn't embed cover art either, right?

Anyway, there are probably other tags I haven't considered (like the ITUNNORM and ITUNSMPB for soundcheck and gapless). I just wondered if anyone else has looked into this already or knows of other ways the output from this script diverges from how Apple's service displays its own metadata.

Much appreciate any tips/advice/discussion on this. Thanks again!