Refreshing movie images in iTunes on OSX Mac using a simple automator and applescript

My itunes images seems to disappear from iTunes regularly.

I am not sure what causes it, however I would like it fixed.

There does not seem to be any application to do it, so instead looked into do it directly in iTunes.

Various sites described a fix whereby, you select the Movie in iTunes, then right mouse click and select Get Info. For some reason if the image exists on the file then this will reset the image in iTunes.

I have hundreds of movies, so I did not want to do this manually.

Unfortunately Mac Automator does not record keystrokes, so I wrote a quick Applescript to do this to 100 Movies in a list in iTunes at a time.

After 5 minutes it was all fixed, so thought I would post it, as it is easy, and fixes the problem.


So to do it you need to:

1. Open iTunes, and get a list of movies like the below. So select Movies, then View>View As> List

2. Select the first movie in the list in iTunes.

3. Open Automator, by selecting the Magnifying glass (Search) in the top right hand corner of you Mac, and typing Automator in the search field

4. In automator, click on Library in the list on the left, then in the search field in Automator type "appl", and then in the list below select Run Applescript

5. This open a box on the right hand side of Automator called Run Applescript, as seen in the picture above.

6. Then in the Run Applescript box, make sure that you have the following:

on run {input, parameters}
    tell application "iTunes" to activate
    repeat 100 times
         tell application "System Events" to keystroke "i" using {command down}
         tell application "System Events" to key code 53
         tell application "System Events" to key code 125
    end repeat
    return input


end run
7. Then select the Play button in Automator, and the script above should run, it should go down the list of your movies, one at a time for 100 movies. If you have more than 100 movies, then wait until it finishes, then run it again, until it has completed the entire list.

All of your movies should then have their images back.

Comments