watch this  

the official mrchucho blog

iTunes Applescript - Disable Entire Genre

Posted 2005 Feb 13
I have a bunch of Live music in my iTunes library, but I don’t necessarily want it included in my iPod Shuffle when it Autofills. So, I select “Only update checked songs” in iPod preferences and run this Applescript to disable (i.e. uncheck) all songs in my library matching the selected genre.
<pre><code>
tell application "iTunes" 
    set theGenre to "" 
    display dialog "Enter Genre:" default answer theGenre
    set theGenre to text returned of the result
    copy (a reference to library playlist "Library") to mainLibrary
    repeat with i from 1 to (get index of last track of mainLibrary)
        tell track i of mainLibrary
            ignoring case, punctuation and white space
            if (get genre of it) is equal to theGenre then
                set enabled to false
            end if
            end ignoring
        end tell
    end repeat
    display dialog "Done!" giving up after 3
end tell
</code>
Or download: DisableGenre.zip

Responses to "iTunes Applescript - Disable Entire Genre"

No responses yet.

Comments are now closed.
atom rss