Add currently-playing track an iPhone/iPod playlist
Dec 21, '09 07:30:02AM • Contributed by: microbians
Dec 21, '09 07:30:02AM • Contributed by: microbians
This AppleScript will add the current track you are playing to a play list (currently named street) on your iPhone (or iPod). It will also make a backup of this added track to a playlist on the iTunes local playlists (also named street). The script also checks first if a song exists on the playlist, so as to not duplicate any tracks.
This script is inspired by the Add Selected Tracks to iPod and Backup from Doug's AppleScripts for iTunes.
[robg adds: I haven't tested this one.]
property playlistname : "street" tell application "iTunes" repeat with s in sources if (kind of s is iPod) then set the_ipod to s end repeat set doit to true set idx to (count tracks of playlist playlistname of the_ipod) repeat with i from 1 to idx set n to track i of playlist playlistname of the_ipod set n to (name of n as string) & (artist of n as string) & (album of n as string) set m to (name of current track as string) & (artist of current track as string) & (album of current track as string) if (n is m) then set doit to false set v to output volume of (get volume settings) set volume output volume 30 say "Dup file!" set volume output volume v exit repeat end if end repeat if (doit is true) then try duplicate current track to playlist playlistname of the_ipod duplicate current track to playlist playlistname end try end if end tell
[robg adds: I haven't tested this one.]
•
[7,487 views]
