The script is based on Doug Adams' Reset Tracks Start script (GNU GPL). My version of his script goes through every track in a playlist and sets track start time to 90 seconds (you can adjust this number to suit your needs). "News" is the name of my playlist; change accordingly.
property my_title : "Trim all tracks in a playlist" tell application "iTunes" set thePlaylist to playlist "News" with timeout of 300 seconds repeat with i from 1 to (index of last track of thePlaylist) my reset_this(track i of thePlaylist) end repeat end timeout end tell to reset_this(t) tell application "iTunes" try set start of t to 90.0 on error m log m end try end tell end reset_this
I use crontab to run this script every morning, but you can use iCal:
- Create a recurring event (every morning at 7 am, for example)
- Choose Alarm and select Run Script, locate the script file you've just created
NB: "trimming" does NOT actually trim your tracks, it merely adjusts the starting point; this is totally reversible and instantaneous. If you want to undo this, just change 90.0 to 0.0 and re-run the script.
[kirkmc adds: This is sweet. The only problem is that different podcasts have different length intros. So what I'm going to do is make a number of scripts with different offset times and run them on selected podcasts, adding the podcasts as I want to a playlist on which the script acts. I asked Doug Adams how to change this script so it acts on a selection rather than a playlist. He said to use the following:
property my_title : "Trim all tracks in a playlist" tell application "iTunes" set theSelection to selection with timeout of 300 seconds repeat with aTrack in theSelection my reset_this(aTrack) end repeat end timeout end tell to reset_this(t) tell application "iTunes" try set start of t to 90.0 on error m log m end try end tell end reset_this

