# \[WS\] Apple Music

**URL:** <https://community.mp3tag.de/t/ws-apple-music/51184>\
**Category:** Web Sources Scripts\
**Created:** [December 14, 2020, 12:58am UTC](https://community.mp3tag.de/t/ws-apple-music/51184 "2020-12-14T00:58:26Z")\
**Posts on this page:** 20\
**Page:** 13

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [December 30, 2022, 9:20pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/262 "2022-12-30T21:20:40Z")

</div>

> [@ohrenkino](#):
>
> To join 2 fields and remove one of them, try an action of the type "Guess value"  
> Source: %title% %comment%==  
> Target pattern: %title%==%comment%

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.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [December 30, 2022, 9:39pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/263 "2022-12-30T21:39:06Z")

</div>

A post was split to a new topic: [Remove time stamp from date](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571)

---

<div class="post-metadata">

**Author:** ![AreDigg](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@AreDigg](https://community.mp3tag.de/u/AreDigg)\
**Post date:** [December 30, 2022, 10:08pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/264 "2022-12-30T22:08:16Z")

</div>

> [@ceo54](#):
>
> Edit: Album artwork is always 2400x2400, is it possible to obtain the highest possible resolution artwork through the script ?

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

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

```

with

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

```

---

<div class="post-metadata">

**Author:** ![AreDigg](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/bbe5ce/32.png) [@AreDigg](https://community.mp3tag.de/u/AreDigg)\
**Post date:** [December 30, 2022, 10:20pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/265 "2022-12-30T22:20:00Z")

</div>

> [@ceo54](#):
>
> The script is writing some data in the comment field and I just want it to be completely empty. So how do I empty it out removing the entry from this field ?

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.

---

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [December 30, 2022, 11:05pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/266 "2022-12-30T23:05:55Z")

</div>

Thanks bud, appreciated.

---

<div class="post-metadata">

**Author:** ![zhordon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zhordon](https://community.mp3tag.de/u/zhordon)\
**Post date:** [December 30, 2022, 11:08pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/267 "2022-12-30T23:08:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lukriax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c67d28/32.png) [@Lukriax](https://community.mp3tag.de/u/Lukriax)\
**Post date:** [January 1, 2023, 1:25pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/268 "2023-01-01T13:25:08Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [January 1, 2023, 1:27pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/269 "2023-01-01T13:27:32Z")

</div>

What about this reply?

> [@\[WS\] Apple Music](https://community.mp3tag.de/t/ws-apple-music/51184/240):
>
> I think this would be easiest to be achieved with a separate action:

---

<div class="post-metadata">

**Author:** ![mirogeorgiev97](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mirogeorgiev97/32/9472_2.png) [@mirogeorgiev97](https://community.mp3tag.de/u/mirogeorgiev97)\
**Post date:** [January 2, 2023, 7:47pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/270 "2023-01-02T19:47:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![UPTICC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@UPTICC](https://community.mp3tag.de/u/UPTICC)\
**Post date:** [January 2, 2023, 10:58pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/271 "2023-01-02T22:58:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![UPTICC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@UPTICC](https://community.mp3tag.de/u/UPTICC)\
**Post date:** [January 2, 2023, 11:29pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/273 "2023-01-02T23:29:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Arbiter](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@Arbiter](https://community.mp3tag.de/u/Arbiter)\
**Post date:** [January 3, 2023, 5:42am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/274 "2023-01-03T05:42:41Z")

</div>

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

```auto
=================================
# 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](https://community.mp3tag.de/uploads/short-url/ukugp8cVqw3klHLea2NWY6nGpyI.zip) (43.4 KB)

---

<div class="post-metadata">

**Author:** ![mirogeorgiev97](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mirogeorgiev97/32/9472_2.png) [@mirogeorgiev97](https://community.mp3tag.de/u/mirogeorgiev97)\
**Post date:** [January 3, 2023, 6:35pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/275 "2023-01-03T18:35:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [January 3, 2023, 6:47pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/276 "2023-01-03T18:47:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arbiter](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@Arbiter](https://community.mp3tag.de/u/Arbiter)\
**Post date:** [January 3, 2023, 7:45pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/277 "2023-01-03T19:45:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zhordon](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/35a633/32.png) [@zhordon](https://community.mp3tag.de/u/zhordon)\
**Post date:** [January 7, 2023, 1:37am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/278 "2023-01-07T01:37:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Diaub](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@Diaub](https://community.mp3tag.de/u/Diaub)\
**Post date:** [January 23, 2023, 2:44am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/280 "2023-01-23T02:44:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mirogeorgiev97](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mirogeorgiev97/32/9472_2.png) [@mirogeorgiev97](https://community.mp3tag.de/u/mirogeorgiev97)\
**Post date:** [January 23, 2023, 2:58am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/281 "2023-01-23T02:58:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Diaub](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@Diaub](https://community.mp3tag.de/u/Diaub)\
**Post date:** [January 23, 2023, 2:59am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/282 "2023-01-23T02:59:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bookemdano](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@bookemdano](https://community.mp3tag.de/u/bookemdano)\
**Post date:** [February 24, 2023, 12:24am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/283 "2023-02-24T00:24:52Z")

</div>

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!

[Previous page](https://community.mp3tag.de/t/ws-apple-music/51184.md?page=12)

[Next page](https://community.mp3tag.de/t/ws-apple-music/51184.md?page=14)
