# \[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:** 16

<div class="post-metadata">

**Author:** ![Khai83](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/b5a626/32.png) [@Khai83](https://community.mp3tag.de/u/Khai83)\
**Post date:** [August 26, 2023, 8:15pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/325 "2023-08-26T20:15:45Z")

</div>

You need access to Apple Music API to fetch "Barcode" but some music use that 12-digit number as their album art filename. So if that happen you can grab them by:

```auto
json_select_object "artwork"
IfNot ""
		json_select_object "dictionary"
			json_select "url"
			RegexpReplace ".+\/(\d{12})\.jpg\/.*" "$1"
			RegexpReplace "^https.*" "Null"
			IfNot "Null"
				OutputTo "BARCODE"
				SayRest
			EndIf
		json_unselect_object
	json_unselect_object
EndIf

```

---

<div class="post-metadata">

**Author:** ![DrStevil3](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@DrStevil3](https://community.mp3tag.de/u/DrStevil3)\
**Post date:** [August 27, 2023, 3:08pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/326 "2023-08-27T15:08:59Z")

</div>

I think you were correct that the script wasn't able to find the settings file. I am using v3.7. The filename for the settings file (as downloaded and unzipped) was "&Apple Music#SettingsΓÇª.settings". I fixed the problem by renaming the settings file to "&Apple Music#Settings.settings", then opening the "Apple Music Web.inc" file and replacing "[Settings]=&Apple Music#Settings….settings" with "[Settings]=&Apple Music#Settings.settings". Now it's working.

@AreDigg was the settings filename supposed to be "&Apple Music#SettingsΓÇª.settings" or are the "ΓÇª" there by accident somehow?

---

<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:** [August 27, 2023, 4:51pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/327 "2023-08-27T16:51:03Z")

</div>

> [@DrStevil3](#):
>
> was the settings filename supposed to be "&Apple Music#SettingsΓÇª.settings" or are the "ΓÇª" there by accident somehow?

Check your software you use to unzip, or that your filesystem supports UTF-8.

---

<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:** [August 27, 2023, 6:14pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/328 "2023-08-27T18:14:10Z")

</div>

Thanks, at what line do I put it ?

---

<div class="post-metadata">

**Author:** ![Khai83](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/b5a626/32.png) [@Khai83](https://community.mp3tag.de/u/Khai83)\
**Post date:** [August 27, 2023, 9:04pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/329 "2023-08-27T21:04:40Z")

</div>

```auto
IfOutput "ValidSection"
	json_foreach "items"
		# Primary
		...
		# Secondary
		# Cleanup
		# Third
		Set "SectionAlbum"
		Set "SectionSong"

```

Hmm, anywhere from `# Secondary` but before `Set "SectionAlbum"`, but to be specific: `Apple Music v3.7` lines 530-531

```auto
OutputTo "COVERURL"
json_select_object "artwork"
IfNot ""
		json_select_object "dictionary"
			...
		json_unselect_object
	json_unselect_object
EndIf

json_select_object "artwork"
IfNot ""
		json_select_object "dictionary"
			json_select "url"
			RegexpReplace ".+\/(\d{12})\.jpg\/.+" "$1"
			RegexpReplace "^https.*" "Null"
			IfNot "Null"
				OutputTo "BARCODE"
				SayRest
			EndIf
		json_unselect_object
	json_unselect_object
EndIf

# Third
IfOutput "SectionAlbum"
...

```

---

<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:** [August 28, 2023, 12:56am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/330 "2023-08-28T00:56:07Z")

</div>

> [@Khai83](#):
>
> `OutputTo "BARCODE"`

Tried on two albums but couldn't find the barcode value, I must be doing something wrong.

```auto
                    json_select_object "artwork"
                    IfNot ""
		                       json_select_object "dictionary"
			                        json_select "url"
			                        RegexpReplace ".+\/(\d{12})\.jpg\/.+" "$1"
			                        RegexpReplace "^https.*" "Null"
			                        IfNot "Null"
				                        OutputTo "BARCODE"
				                        SayRest
			                        EndIf
		                       json_unselect_object
	                json_unselect_object
                    EndIf
				
								
				# Third
				IfOutput "SectionAlbum"
				
					OutputTo "Album"
					json_select "title"
					IfNotVar "originalTitles" "true"
						Replace " - Single" ""
						Replace " - EP" ""
						RegexpReplace "\(.*\)" ""
						RegexpReplace "\[.*\]" ""
					EndIf
					If ""
						json_select "title"
					EndIf
					SayRest

```

---

<div class="post-metadata">

**Author:** ![Khai83](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/b5a626/32.png) [@Khai83](https://community.mp3tag.de/u/Khai83)\
**Post date:** [August 28, 2023, 2:15am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/331 "2023-08-28T02:15:29Z")

</div>

![Untitled_1](https://community.mp3tag.de/uploads/default/original/2X/8/8acc5f6ab43d837778b402d0de998c0d8a1041dc.png)

 ![Untitled_2](https://community.mp3tag.de/uploads/default/original/2X/a/a574de9c5592efa3348223dfb4c4e62c5e5887ff.png)  
Here edited v3.7 I used. I only tested it with USA (English).src and UK (English).src  
[Apple Music Web v3.7.inc [edited].zip](https://community.mp3tag.de/uploads/short-url/2sl7DGJSO6DCiMOdaTlrV96Omsc.zip) (4.5 KB)  
Not every album art named with their barcode. BTW what you search for ?

---

<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:** [August 28, 2023, 6:42am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/332 "2023-08-28T06:42:38Z")

</div>

Thanks Khai, it works but only a few albums retrieved the Barcode value, around 2 from 20 albums I tried so I think it's not worth the effort and maybe we should try something else that yields better results.

But in any case, I thank you for kind assistance, your contribution is highly appreciated.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [August 29, 2023, 8:13am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/333 "2023-08-29T08:13:15Z")

</div>

Since the new versions became necessary, I've noticed changes in the search results.  
**If I remember the previous behavior correctly** , matching albumnames and songnames according to the search string were listed in the previous versions.  
But now I get **all** the songs on the album I'm looking for in the list of results, not just those whose title names match the album name.

I'm 99.99% interested in pure album results when searching the web source and the additional song results only bother me because they sometimes bring an inflation of results that are irrelevant to me. In my opinion, someone who is only interested in individual songs would enter them into the search mask and not search for the album.

Would it be possible to limit the list of results to albums and EPs by changing the script?

---

<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:** [August 30, 2023, 5:43pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/334 "2023-08-30T17:43:04Z")

</div>

> [@poster](#):
>
> Would it be possible to limit the list of results to albums and EPs by changing the script?

Yes I could add an option to not show the songs in the result.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [August 31, 2023, 4:32am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/335 "2023-08-31T04:32:09Z")

</div>

> [@AreDigg](#):
>
> Yes I could add an option to not show the songs in the result.

I would appreciate this option.

---

<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:** [September 3, 2023, 4:26am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/337 "2023-09-03T04:26:13Z")

</div>

I have tested out a new alternative version, which uses a python proxy web server. If you are a bit savvy you can try it out yourself. You need to make your own cert-keys for the server for ssl.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [September 3, 2023, 6:35am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/338 "2023-09-03T06:35:25Z")

</div>

Thanks for bringing this option in your new version 3.10.

---

<div class="post-metadata">

**Author:** ![Oceanic](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Oceanic](https://community.mp3tag.de/u/Oceanic)\
**Post date:** [September 9, 2023, 6:19am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/339 "2023-09-09T06:19:16Z")

</div>

the script doesn't work at all on MAC version of mp3tag

---

<div class="post-metadata">

**Author:** ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)\
**Post date:** [September 9, 2023, 7:35am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/340 "2023-09-09T07:35:52Z")

</div>

It works, please be more specific (versions, queries, …)

---

<div class="post-metadata">

**Author:** ![Salem874](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/bc79bd/32.png) [@Salem874](https://community.mp3tag.de/u/Salem874)\
**Post date:** [September 9, 2023, 9:11pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/341 "2023-09-09T21:11:36Z")

</div>

This looks interesting - would be willing to give it a go...?

---

<div class="post-metadata">

**Author:** ![Oceanic](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Oceanic](https://community.mp3tag.de/u/Oceanic)\
**Post date:** [September 9, 2023, 10:06pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/342 "2023-09-09T22:06:26Z")

</div>

hi florian sorry my mistake, the Apple Music for MP3Tag v3.10 works but its the web source 4.0b1 which i was trying out. this one somehow doesnt work. im on mac ventura 13.5.1 with mp3tag Version 1.8.5 (85)

---

<div class="post-metadata">

**Author:** ![johannes.amble](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@johannes.amble](https://community.mp3tag.de/u/johannes.amble)\
**Post date:** [October 13, 2023, 7:16am UTC](https://community.mp3tag.de/t/ws-apple-music/51184/343 "2023-10-13T07:16:13Z")

</div>

First of all, thanks for making this fantastic script, AreDigg! For someone who needs quick acceess to metadata from recently released music, this is a huge time saver. Although I have one question:  
Would it be possible to implement the Producer tag among the tags that are being imported? On one recent occasion it actually did, and I tried to figure out why – but I haven't been able to recreate the circumstances for it to happen again. It was an album that wasn't available on Apple Music in my territory, so I located the iTunes ID and used it to search though the US version of the script. My point being: Apparently it's possible, but is it possible to tweak it to make it standard?

---

<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:** [October 13, 2023, 3:05pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/344 "2023-10-13T15:05:25Z")

</div>

There is no "producer" from the source, it adds a publisher if a "recordLabel" field is available.

---

<div class="post-metadata">

**Author:** ![Zyntaxyz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/53a042/32.png) [@Zyntaxyz](https://community.mp3tag.de/u/Zyntaxyz)\
**Post date:** [October 13, 2023, 8:07pm UTC](https://community.mp3tag.de/t/ws-apple-music/51184/345 "2023-10-13T20:07:56Z")

</div>

Apparently there are two different sources

 ![Screenshot_2023-10-13-13-31-47-450_org.mozilla.fenix~2](https://community.mp3tag.de/uploads/default/original/2X/7/7952664e21c74fbd81b4f7b3e1b3b813976c0b98.jpeg)

 ![Screenshot_2023-10-13-13-32-15-383_org.mozilla.fenix~2](https://community.mp3tag.de/uploads/default/original/2X/d/d9302b8eda81dea06e7b1ea35527a602a14f1908.jpeg)

Is there a way to get composer info from the song credits?

P.D. Idk if I'm violating the terms for upload these screenshots, sorry for that.

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

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