[WS] Apple Music

thank you! do you happen to know the impact of Country ID, Genre ID & XID? what impact they have on iTunes/iPhone?

@AreDigg

I would like to modify your Apple script so that only the COMPOSER tag field is filled.
With this it would be possible to add the previously missing COMPOSER tag field to my already tagged music inventory without touching existing tag fields.

Since I only have rudimentary knowledge of scripts, I get stuck at one point.
In order to change your script as little as possible, I wanted to reset the unwanted tag fields at the end of the script, e.g.
set "albumartist"
set "album"
.....

The problem seems to be TRACKS.
When I reset TRACKS the number of tracks in the left Windows (Websource) is based solely on the number of files in the right field (files marked in MP3Tag).
If Apple has more tracks in the album, they will not be listed.
If the album-websource contains fewer tracks, additional fields are displayed that contain the COMPOSER more than once.

When I don't reset TRACKS, in addition to the COMPOSER field, TRACK, TITLE.and LENGTH are also displayed.

It would be ideal for me if only COMPOSER and LENGTH were displayed, whereby LENGTH could serve as a guide for the correctness of the display and otherwise would not be a problem, since it is not written in a tag field.

As you can see, I don't really understand the script in all points.
Can you give me the decisive tip?

I am not sure where you fail, but you need to ensure there are enough data for each track. I haven't looked into the details of the scripting system, if some fields are required. You would have to ask Florian if there are any quirks about that.

@AreDigg

I have a question about something in your Apple Music script.

json_select_object "artists"
    json_select_many "data" "id" ", "
    OutputTo "ITUNESARTISTID"
    IfNot ""
        SayRest
    EndIf
    Say "|"
json_unselect_object

This code above in your script will get every artist ID when there is more than one artist for a song. Do you know how to change this code so that it will only get the first artist ID?

I found an Apple Music script that only gets the first artist ID.

@AreDigg

Not sure if it's just me, but the Apple Music script doesn't work anymore as of today. It doesn't bring up any data after searching for a song.

1 Like

it's not just you. I've been seeing the same thing. It worked fine just this morning. I'm hoping it's just a short term issue on Apple's side...

Apple changed somethings but should work with this version.

Apple Music for Mp3Tag 1.7.zip (33.2 KB)

2 Likes

If you change that part of the script to

json_select_object "artists"
    json_select_object "data"
        json_select_array "id" 1
        OutputTo "ITUNESARTISTID"
        IfNot ""
            SayRest
        EndIf
        Say "|"
    json_unselect_object
json_unselect_object

it should only give you the first id.

Interesting. He took my script and modified it. I would have appreciated if he asked before.

I changed it to that, but it didn't work. It didn't output any artist ID.

I guess that's happening when you write something and not testing it, try this:

json_select_object "artists"
    json_select_array "data" 1
        json_select "id"
        OutputTo "ITUNESARTISTID"
        IfNot ""
            SayRest
        EndIf
        Say "|"
json_unselect_object

Anyway a new version
Apple Music for Mp3Tag 1.9.zip (34.3 KB)

4 Likes

Hi AreDigg.
I know you've been improving your script with every new version, I was using the v1.5 and it work so good 'til just show up nothing, then I updated and no more problems. I really like (love) having my library well tagged. And since I found your scripts my life is so easy now, BUT, as I said in the beggining, every time the script stops working its because Apple changes something? And i'm afraid you're gonna get tired of updating so frecuently, and this is a TIME-SAVER for me, I can tagg my files by myself to make it looks like if your scrpit was using in the following terms:
Me: 15-20 minutes - per album
WS Apple Music: 1 minute per album

An finally I really like to give a Big thank You :kissing_closed_eyes:

Saludos desde :argentina:

Thanks for kind words.

Yes they stop working because Apple changes things. And there is the risk that Apple will change stuff so it will not be able to work. This is not official way to access Apple Music database, as to access it officially you will need to do it with the developer id and preferably in a way to promote/offer Apple Music, or for customers of Apple Music. I will keep updating it as I use it myself, and for now the changes required are usually minor and anyone with some programming skills should be able to make them work. It could also be possible to make it more resilient to the changes, but for now it is easier to just modify the script.

1 Like

This worked. Thank you!

Hi AreDigg,

I'm wondering if it would be possible to break out the data scrub into a separate inc file (assuming it's the data scrub portion of the script that apple keeps breaking)? Taking that approach would allow users that are tweaking the search and naming portions of your scripts to meet our specific needs to leave our changes intact when updates are necessary. Just a thought.

Thanks for sharing this script by the way - It's helped fill all kinds of gaps in my metadata.

It is not so complicated that should be necessary.

What is breaking is the top level of the json, as it seem to be constructed of what is likely an internal query string into the database. In a way it has been somewhat beneficial when it breaks, as Apple has added more data onto the query every time, and thus returning more.

Fair enough. The potential for some additional data is a unexpected bonus for sure!

Thanks

Not sure if this has been checked out, but is it possible to have this apply the itunesadvisory field?

A little update. I have added so it picks up music videos if they exist on the albums. A few bug fixes and minor changes.

Apple Music for Mp3Tag 2.0.zip (34.8 KB)

2 Likes