[WS] iTunes

oh wow that's it! superb that's been bugging me for a few days. i've been searching for a way to get the itunes meta onto the mp4's to show under the apple tv.

such a shame the lookup data doesn't seem to include cast, screenwriter or producer fields, only in the html. nevermind tho this will do nicely!

many thanks for your help with that and thanks again for your excellent script!

Hi pone,
this is found in the iTunes store. Therefore I wanted it to tag with your srcipt but the script can't find it.
iTunes

It's again the problem that the album is not in the US itunes store, only in the GB.

You can modify the script to get to other catalogs than the US catalog. For example to get the GB catalog, change the following two lines to appear like this:

[IndexUrl]=http://itunes.apple.com/search?term=%s&entity=album&limit=100&country=GB
[AlbumUrl]=http://itunes.apple.com/lookup?country=GB&id=

Thank you very much, pone.
I had a look in the API documentary and noticed that there seem to be a lot of different national stores and you can define them with country ISO-codes.
I tried DE and this album was found too.

Do you have any experience how much these stores differ and wether it makes any sense to define more special srcipt-versions for different country-stores?

2pone:
Thanks for the great script! Can you add 3 additional tag fields: TOTALTRACKS, DISCNUMBER, TOTALDISCS? And replace PUBLISHER tag with COPYRIGHT, as in the original songs from iTunes Store?

@poster:
I have no experience how much they differ. The only thing I can say is, there were about three questions here in the forum about problems with albums that could not be found because of that problem.
So there seem to be quite a lot of these cases. I will make a package with 5 or more specific country scripts at the next update.

@Link:
I can build in TOTALTRACKS.

If you want COPYRIGHT instead of PUBLISHER, you will have to edit the script yourself. I think PUBLISHER is more standard. But it's easy to chang for yourself. Upen the src fie in a text editor and change
outputto "PUBLISHER"
into
outputto "COPYRIGHT"

Do DISCNUMBER and TOTALDISCS make sense for itunes? Are there any discs? I Only see digital download releases there.

Thanks, it works!

Yes, itunes has the "Disc number" field. It is useful for sorting of multi-disc albums.

Don't confuse the mediaplayer itunes (your screenshot) with the download shop itunes (my script).

Hello,

Thank you for this script, I have some issues tho...
The Album:
http://itunes.apple.com/gb/album/sound-dub...8?affId=1405655

Has 30 tracks on the UK iTunes site I am unable to check the US version as it wouldn't open in my browser and kept telling me to download iTunes.

But using the script it only has tags for the first 15 tracks.


OK I fixed it :slight_smile:
I changed the script to access the uk iTunes instead by changing 2 lines:

[IndexUrl]=http://itunes.apple.com/search?term=%s&country=GB&entity=album&limit=100
[AlbumUrl]=http://itunes.apple.com/lookup?country=GB&id=

Hello, I'm a French Person and I would like to have the Web Sources Scripts for iTunes France please ! Thanks :rolleyes:

You can modify the script to get to other catalogs than the US catalog. For example to get the iTunes France catalog, change the following two lines to appear like this:

[IndexUrl]=http://itunes.apple.com/search?term=%s&entity=album&limit=100&country=FR
[AlbumUrl]=http://itunes.apple.com/lookup?country=FR&id=

Oh thanks, thanks !! You are awesome ! And why do you the release date from the music ! I would like to have the complete date on my Music please. (ex. Released: Apr 27, 2012)

Because I want to keep this script simple. When I add a DATE tag-field, there will be new problems with releases where this information is not present or not completet. Furthermore there are different ways of date formates prefered by the users, I would have do make different script versions to fit all wishes. And I don't know what release dates itunes is displaying for old recordings. The release date of the first vinyl or CD release (which is the only thing which would be interessting), or the digital re-release date in the itunes store.

If you are keen on that you can experiment a little bit with that. I will help you to modify the script if I find some time. If it is working with all releases, maybe we can include that into the script.

Agree. Thank you for your message! But take your time. I am already satisfied with emplement MP3Tag! (P.S I use the latest version of iTunes)

Sorry Pone for barging in on your script but I've modified your script to the way I like it. This may be of help to you 'AppleAddict'.

Format as follows:
YEAR: YYYY-MM-DD
DATE: MMDD

Added/changed lines of code (highlighted):

#ALBUM

outputto "ALBUM"
sayregexp "(?<="collectionName":").+?(?=")" ", " "}"
# YEAR
outputto "YEAR"
sayregexp "(?<="copyright":")\d\d\d\d(?=.)" ", " "}"

regexpreplace "(\d\d\d\d),?" "<<<year$1>>>"
findinline ""copyright":"" 1 1
ifnot "<<<year"

gotochar 1
sayregexp "(?<=\"releaseDate\":\"<<<year)\d\d\d\d(?=>>>)" ", " "}"
say "-"
sayregexp "(?<=>>>-)\d\d-\d\d(?=.)" ", " "}"

else

gotochar 1

endif

DATE

outputto "DATE"
regexpreplace ">>>-(\d\d)-(\d\d)" ">>>-$1$2"
sayregexp "(?<=>>>-)\d\d\d\d(?=.)"

PUBLISHER

outputto "PUBLISHER"
regexpreplace "<<<year\d*>>>" ""
regexpreplace " +" " "
sayregexp "(?<="copyright":").+?(?=")" ", " "}"

I've also added a WWW field to it.
e.g: http://itunes.apple.com/us/album/dont-you-...dio/id559259832

Added/changed lines of code (highlighted):

# COVER

outputto "COVERURL"
sayregexp "(?<="artworkUrl100":").+?(?=")" ", " "}"

# WWW

outputto "WWW"
sayregexp "(?<="collectionViewUrl":").+?(?=?)" ", " "}"

ALBUMARTIST

outputto "ALBUMARTIST"
sayregexp "(?<="artistName":").+?(?=")" ", " "}"

It seems to work okay with no problems as yet.

thanks stevehero, looks good.
does it work for all releases? is the release date always present?

Cheers, yeah everything works like a charm my end. I have yet to come across a release date yet (unless other people have) that has been missing.

As long as people remember to put the bits in the right places like I have in the above post then everyone should have no problem.

Just wanted to say a big thanks been using this script for a bit now and it helps a lot saving time.

Is only one country possible?

I guess so.
But you can make different versions of the script for different countries. Use a different filename for each one!