Skip to content

Instantly share code, notes, and snippets.

@talios
Created June 13, 2011 01:18
Show Gist options
  • Select an option

  • Save talios/1022190 to your computer and use it in GitHub Desktop.

Select an option

Save talios/1022190 to your computer and use it in GitHub Desktop.
Hacking iTunes playlist for funky sorting.
iTunes := SBApplication applicationWithBundleIdentifier:'com.apple.iTunes'
playlists := ((iTunes sources at: 0) playlists.
playlist := (playlists where: playlists name = 'The Full Daily Play').
playlist tracks do: [:track |
track setSkippedDate: (NSDate dateWithString:
(track dateAdded description substringWithRange: (NSValue rangeWithLocation:0 length:8))
++ '01 00:00:00 +1200')
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment