Brian
Brian

Reputation: 93

iTunes Movies metadata refresh

I have a number of movies in my iTunes 12.7.3.46 library on my Mac Mini. I have manually added album art to each video, but only about half the movies actually show the album art when viewing the movies from my AppleTV. The other half of the movies just show a frame. I double checked Get Info for the movies that aren't displayed the album art and confirmed that the album art is listed. Once I do this, the AppleTV will display the album art. I would like to write an applescript that I can run that will basically automatically do a "Get Info" for each movie so the art will display. Here is what I have so far:

tell application "iTunes"
    set MovieList to tracks of playlist "Movies"
    repeat with x from 1 to count of MovieList
        tell (item x of MovieList)
            refresh MovieList
        end tell
    end repeat
end tell

I saved the script here: /Library/iTunes/Scripts/Refresh.scpt

When I try to run this in iTunes (inside iTunes, there is a Scripts menu (an icon of a scroll, just left of Help), I get:

{«class cFlT» id 55680 of «class cUsP» id 55668 of «class cSrc» id 66 of application "iTunes", «class cFlT» id 56396 of «class cUsP» id 55668 of «class cSrc» id 66 of application "iTunes", «class cFlT» id 56395 of «class cUsP» id 55668 of «class cSrc» id 

I don't even know what that means....any idea where to go from here?

Upvotes: 0

Views: 332

Answers (1)

wch1zpink
wch1zpink

Reputation: 3142

This work for me using the latest version of Sierra

tell application "iTunes"
    set theTracks to tracks of playlist "Movies"
    repeat with i from 1 to number of items in theTracks
        set this_item to item i of theTracks
        try
            refresh this_item
        end try
    end repeat
end tell

Upvotes: 0

Related Questions