Created
November 15, 2019 19:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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