Skip to content

Instantly share code, notes, and snippets.

@wvteijlingen
Created November 15, 2019 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvteijlingen/923e79fc9f298f16608f828d3120bc32 to your computer and use it in GitHub Desktop.
Save wvteijlingen/923e79fc9f298f16608f828d3120bc32 to your computer and use it in GitHub Desktop.
Finds all purchased songs that are DRM protected, and adds them to a "Protected songs" playlist
-- Finds all purchased songs that are DRM protected, and adds them to a "Protected songs" playlist
tell application "iTunes"
set aPlaylist to (make new user playlist with properties {name:"Protected songs"})
repeat with aTrack in tracks of library playlist 1
if purchaser Apple ID of aTrack is not missing value and kind of aTrack is "Protected AAC audio file" then
duplicate aTrack to aPlaylist
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment