iTunes: 30-second skip podcasts/audiobooks only

Here’s a nice AppleScript I use to rewind or skip 30 seconds in iTunes, but only when the current track is a podcast or audiobook.

This allows you to have a single keyboard shortcut that works as a normal “previous track” key when listening to music, but automatically switches to a 30-second rewind when listening to podcasts, audiobooks, or whatever else you specify.

property skip_secs : 30 -- use negative value to rewind, positive value to skip ahead
property genre_list : {"Podcast", "Books & Spoken"}

tell application "iTunes"
	if (exists of current track) is false then
		return
	end if
	
	if genre of current track is in genre_list then
		set target_time to (player position + skip_secs)
		
		if (target_time > finish of current track) then
			next track
		else if (target_time < 2) then
			back track
		else
			set player position to target_time
		end if
		
	else -- rewind/skip the whole track
		if (skip_secs < 0) then
			back track
		else
			next track
		end if
	end if
end tell

Options

Change the skip_secs property to your preferred interval in seconds. For example, setting skip_secs to 30 will result in a 30-sec fast forward, while setting it to -15 will make it a 15-sec rewind.

If you would like more kinds of tracks to respond to this skip behavior, add the genre names of those tracks to genre_list.