Skip to content

Instantly share code, notes, and snippets.

@donatj
Created November 11, 2015 21:44
Show Gist options
  • Save donatj/12b86fc65982e29f20a2 to your computer and use it in GitHub Desktop.
Save donatj/12b86fc65982e29f20a2 to your computer and use it in GitHub Desktop.
Fixes tracks with a last played but no played count.
tell application "iTunes"
(* this prevents an error on no tracks being found on the set below *)
set played count of first track where played count = 1 to 0
(* sometimes it leaves this if we don't wait *)
delay 1
set played count of every track where played count = 0 and played date ³ (date "Thursday, June 1, 2000 at 12:00:00 AM") to 1
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment