# \[WS\] iTunes Music, Music Videos, Movies, TV Shows

**URL:** <https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537>\
**Category:** Web Sources Scripts\
**Created:** [March 13, 2013, 10:36am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537 "2013-03-13T10:36:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![andathanas](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@andathanas](https://community.mp3tag.de/u/andathanas)\
**Post date:** [March 13, 2013, 10:36am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/1 "2013-03-13T10:36:27Z")

</div>

Updated **23/03/2013**

New version of the scipts with many bug fixes and improvements

[Mp3tag\_iTunes\_23\_03\_2013.zip](https://community.mp3tag.de/uploads/default/original/1X/f15fcbfa2a48b994ae989f77be995e681cacc6d1.zip) (11.5 KB)

Usage:

- Use install.bat to copy the scripts to the folders
- While running mp3tag use web sources menu to tag the files you want

Additional actions:

-Use [iTunes] (1) to remove the "" character from title and other tags.  
Search API is using these symbols but tags dont have them and there might be a  
problem if you try to rename the files from mp3tag (adding files in folders)

-Use [iTunes] (2) to change the numbering format to the standard format used in iTunes  
(Numbering per disk plus disc numbers)

-Use Create MP3TAGLENGTH to create a tag that will compare the length of tracks from  
itunes store to the files you tag. Note that a column must be added to check this.

-Use the rest of optional actions for the described action.

Notes:

-Always take a backup of your tags before using the scripts

-Music video/Movie/TV season scripts work for mp4/m4v files only

-Scripts add non standard tags i use for my collection. They can be removed from  
the extended tags window

For any other info feel free to post at the forums thread.

[Mp3tag\_iTunes\_23\_03\_2013.zip](https://community.mp3tag.de/uploads/default/original/1X/f15fcbfa2a48b994ae989f77be995e681cacc6d1.zip) (11.5 KB)

---

<div class="post-metadata">

**Author:** ![Shocking](https://community.mp3tag.de/user_avatar/community.mp3tag.de/shocking/32/16285_2.png) [@Shocking](https://community.mp3tag.de/u/Shocking)\
**Post date:** [March 18, 2013, 8:10am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/2 "2013-03-18T08:10:57Z")

</div>

Hey, great script - however I've just tried to use it on a few various artists compilations and this is all I get... am I doing something wrong? I don't think I am.

Regards

 ![](https://community.mp3tag.de/uploads/default/original/2X/5/5683a2cbb3322735f860a74ffdda20d2d723af59.JPG)

---

<div class="post-metadata">

**Author:** ![andathanas](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@andathanas](https://community.mp3tag.de/u/andathanas)\
**Post date:** [March 19, 2013, 9:48pm UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/3 "2013-03-19T21:48:50Z")

</div>

Updated

---

<div class="post-metadata">

**Author:** ![Shocking](https://community.mp3tag.de/user_avatar/community.mp3tag.de/shocking/32/16285_2.png) [@Shocking](https://community.mp3tag.de/u/Shocking)\
**Post date:** [March 20, 2013, 7:28am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/4 "2013-03-20T07:28:23Z")

</div>

It's a real shame because your script is almost perfect. I absolutely love it due to the fact it adds so much information, including the explicit tags, etc.

Many thanks once again for creating it.

Just one final thing, and it might be of use to you to help you resolve the problem, apologies if it's not, but have you seen the original iTunes script a few posts down?

[iTunes Script](https://community.mp3tag.de/t/13478/1)

For albums and singles which return the blank results error page on yours, I then switch to this one and it works flawlessly. It's just a real shame it's not as detailed as yours.

Keep up the good work everyone creating these extremely helpful scripts. 🙂

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [March 20, 2013, 8:03am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/5 "2013-03-20T08:03:14Z")

</div>

Try this code:

```
OutputTo "AMGARTISTID"
sayregexp "(?<=\"amgArtistId\":)\d+(?=,)" ", " "}"

```

Updated

---

<div class="post-metadata">

**Author:** ![Shocking](https://community.mp3tag.de/user_avatar/community.mp3tag.de/shocking/32/16285_2.png) [@Shocking](https://community.mp3tag.de/u/Shocking)\
**Post date:** [March 20, 2013, 9:17am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/6 "2013-03-20T09:17:25Z")

</div>

QUOTE (dano @ Mar 20 2013, 09:03) \<{POST\_SNAPBACK}\>

Try this code:

```
OutputTo "AMGARTISTID"
FindLine "\"amgArtistId\":" 1 1
sayregexp "(?<=\"amgArtistId\":)\d+(?=,)" ", " "}"<!--QuoteEnd--></div><!--QuoteEEnd-->

```

Still no luck. ☹

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [March 20, 2013, 10:47am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/7 "2013-03-20T10:47:09Z")

</div>

My bad. I've edited my post now it should work.

---

<div class="post-metadata">

**Author:** ![Shocking](https://community.mp3tag.de/user_avatar/community.mp3tag.de/shocking/32/16285_2.png) [@Shocking](https://community.mp3tag.de/u/Shocking)\
**Post date:** [March 20, 2013, 10:55am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/8 "2013-03-20T10:55:12Z")

</div>

Nice one mate. Unfortunately I have to leave for work now but I shall try it later on. 😃

---

<div class="post-metadata">

**Author:** ![Shocking](https://community.mp3tag.de/user_avatar/community.mp3tag.de/shocking/32/16285_2.png) [@Shocking](https://community.mp3tag.de/u/Shocking)\
**Post date:** [March 20, 2013, 10:59am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/9 "2013-03-20T10:59:05Z")

</div>

Bingo! Scrap that. I quickly tried an album and it worked. So far so good. I shall try a few more when I return home.

You, my friend, are a genius! 🙂

---

<div class="post-metadata">

**Author:** ![andathanas](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@andathanas](https://community.mp3tag.de/u/andathanas)\
**Post date:** [March 21, 2013, 3:45pm UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/10 "2013-03-21T15:45:22Z")

</div>

QUOTE (dano @ Mar 20 2013, 11:03) \<{POST\_SNAPBACK}\>

Try this code:

```
OutputTo "AMGARTISTID"
sayregexp "(?<=\"amgArtistId\":)\d+(?=,)" ", " "}"

```

Updated

Thanks a lot for helping.I will update the downloads in first post ASAP. The script is based on dano's script ofc. i made some changes and added other media apart from music.

---

<div class="post-metadata">

**Author:** ![andathanas](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@andathanas](https://community.mp3tag.de/u/andathanas)\
**Post date:** [March 21, 2013, 3:56pm UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/11 "2013-03-21T15:56:48Z")

</div>

> [@Shocking](#):
>
> It's a real shame because your script is almost perfect. I absolutely love it due to the fact it adds so much information, including the explicit tags, etc.
> 
> Many thanks once again for creating it.
> 
> Just one final thing, and it might be of use to you to help you resolve the problem, apologies if it's not, but have you seen the original iTunes script a few posts down?
> 
> [iTunes Script](https://community.mp3tag.de/t/13478/1)
> 
> For albums and singles which return the blank results error page on yours, I then switch to this one and it works flawlessly. It's just a real shame it's not as detailed as yours.
> 
> Keep up the good work everyone creating these extremely helpful scripts. 🙂

Indeed. It includes all info the itunes search api gives. Please keep me informed if you find any other bug so i can fix it.

---

<div class="post-metadata">

**Author:** ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)\
**Post date:** [March 22, 2013, 2:27pm UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/12 "2013-03-22T14:27:15Z")

</div>

nice to see some development on my itunes script  
appreciated

---

<div class="post-metadata">

**Author:** ![Nenesse](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@Nenesse](https://community.mp3tag.de/u/Nenesse)\
**Post date:** [April 13, 2013, 12:20pm UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/13 "2013-04-13T12:20:09Z")

</div>

Because I need it, I edit one of sources script to make it work for french version of iTunes.

Only one change: replace country by FR.

```
#Last Update: 21/3/2013

################################################################################
####################

[Name]=iTunes
[BasedOn]=http://itunes.apple.com
[IndexUrl]=http://itunes.apple.com/search?country=FR&entity=album&term=%s
[AlbumUrl]=http://itunes.apple.com/lookup?country=FR&entity=song&limit=200&id=
[WordSeperator]=+
[IndexFormat]=%_url%|%Artist%|%Album%|%Explicit%|%Tracks%|%Year%|%Genre%|
[SearchBy]=$replace(%_parent_directory%, ,+)+$replace(%_directory%, ,+)
[Encoding]=utf-8

##################################################

[ParserScriptIndex]=...

FindLine "{\""
Do
    JoinUntil "\"}"

#########################

    FindInLine "\"collectionId\":"
    SayUntil ", \""
    Say "|"

    FindInLine "\"artistName\":\""
    SayUntil "\", \""
    Say "|"

    FindInLine "\"collectionCensoredName\":\""
    SayUntil "\", \""
    Say "|"

    regexpreplace "explicit" "Yes"
    regexpreplace "notExplicit" "No"
    FindInLine "\"collectionExplicitness\":\""
    SayUntil "\", \""
    Say "|"

    FindInLine "\"trackCount\":"
    SayUntil ", \""
    Say "|"

    FindInLine "\"releaseDate\":\""
    SayNChars 4
    Say "|"

    FindInLine "\"primaryGenreName\":\""
    SayUntil "\"}"
    Say "|"

#########################

    SayNewLine
    MoveLine 1
While "{\""

##################################################

[ParserScriptAlbum]=...

FindLine "{\""
JoinUntil "\"}"

#########################

OutputTo "ARTISTID"
FindLine "\"artistId\":"
FindInLine "\"artistId\":"
SayUntil ", \""

OutputTo "COLLECTIONID"
FindLine "\"collectionId\":"
FindInLine "\"collectionId\":"
SayUntil ", \""

OutputTo "AMGARTISTID"
sayregexp "(?<=\"amgArtistId\":)\d+(?=,)" ", " "}"

OutputTo "ALBUMARTIST"
FindLine "\"artistName\":\""
FindInLine "\"artistName\":\""
SayUntil "\", \""

OutputTo "ALBUM"
FindLine "\"collectionCensoredName\":\""
FindInLine "\"collectionCensoredName\":\""
SayUntil "\", \""

OutputTo "COVERURL"
regexpreplace "100x100" "600x600"
FindLine "\"artworkUrl100\":\""
FindInLine "\"artworkUrl100\":\""
SayUntil "\", \""

OutputTo "COLECTIONEXPLICITNESS"
FindLine "\"collectionExplicitness\":\""
FindInLine "\"collectionExplicitness\":\""
SayUntil "\", \""

OutputTo "TOTALTRACKS"
FindLine "\"trackCount\":"
FindInLine "\"trackCount\":"
SayUntil ", \""

OutputTo "COPYRIGHT"
FindLine "\"copyright\":\""
FindInLine "\"copyright\":\""
SayUntil "\", \""

OutputTo "COUNTRY"
FindLine "\"country\":\""
FindInLine "\"country\":\""
SayUntil "\", \""

OutputTo "YEAR"
FindLine "\"releaseDate\":\""
FindInLine "\"releaseDate\":\""
SayUntil "\", \""

OutputTo "GENRE"
FindLine "\"primaryGenreName\":\""
FindInLine "\"primaryGenreName\":\""
SayUntil "\"},"

##################################################

FindLine "{\""
Do
    JoinUntil "\"}"

#########################

    Outputto "ITUNESCATALOGID"
    FindLine "\"trackId\":"
    FindInLine "\"trackId\":"
    SayUntil ", \""
    Say "|"

    OutputTo "ARTIST"
    FindLine "\"artistName\":\""
    FindInLine "\"artistName\":\""
    SayUntil "\", \""
    Say "|"

    OutputTo "TRACKS"
    FindLine "\"trackCensoredName\":\""
    FindInLine "\"trackCensoredName\":\""
    SayUntil "\", \""
    Say "|"

    OutputTo "_LENGTH"
    FindLine "\"trackTimeMillis\":"
    FindInLine "\"trackTimeMillis\":"
    SayUntil ", \""
    Say "|"

    OutputTo "ITUNESADVISORY"
    regexpreplace "notExplicit" "0"
    regexpreplace "cleaned" "2"
    regexpreplace "explicit" "4"
    FindLine "\"trackExplicitness\":\""
    FindInLine "\"trackExplicitness\":\""
    SayUntil "\", \""
    Say "|"

    OutputTo "MP3TAGDISC"
    FindLine "\"discNumber\":"
    FindInLine "\"discNumber\":"
    SayUntil ", \""
    Say "/"
    FindLine "\"discCount\":"
    FindInLine "\"discCount\":"
    SayUntil ", \""
    Say "|"

    OutputTo "MP3TAGTRACK"
    FindLine "\"trackNumber\":"
    FindInLine "\"trackNumber\":"
    SayUntil ", \""
    Say "/"
    FindLine "\"trackCount\":"
    FindInLine "\"trackCount\":"
    SayUntil ", \""
    Say "|"

    OutputTo "TRACKTIMEMILLIS"
    FindLine "\"trackTimeMillis\":"
    FindInLine "\"trackTimeMillis\":"
    SayUntil ", \""
    Say "|"

#########################

    MoveLine 1
While "{\""

################################################################################
####################
```

---

<div class="post-metadata">

**Author:** ![andathanas](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@andathanas](https://community.mp3tag.de/u/andathanas)\
**Post date:** [April 14, 2013, 7:05am UTC](https://community.mp3tag.de/t/ws-itunes-music-music-videos-movies-tv-shows/14537/14 "2013-04-14T07:05:00Z")

</div>

> [@Nenesse](#):
>
> Because I need it, I edit one of sources script to make it work for french version of iTunes.
> 
> Only one change: replace country by FR.

Indeed. Change the 2 entries on top lines with the code of your country from

[http://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

This can be done in any of the scripts
