iTunes: Remember Position of Selected

itunesHave you ever downloaded something that wasn’t a podcast, but should behave like a podcast? You know, Russell Crowe reading the collected works of Tolstoy, that kind of thing.

This simple script takes your iTunes selection and sets the “bookmarkable” property to true, so it will remember where you’re up to (invaluable during War and Peace). It will also removed the “shufflable” flag, so that In Our Time from BBC Radio 4 won’t start playing at your next house party. Finally, it will set the genre to “podcast”, for no reason other than it seems more suitable than “grindcore”.

Download Remember-position-of-selected.rb.zip

The source is available for your delectation.

#!/usr/bin/env ruby -w

require 'appscript'

app = Appscript.app('iTunes.app')

app.selection.get.each do |p|
	app.set(p.bookmarkable, :to => true)
	app.set(p.shufflable, :to => false)
	app.set(p.genre, :to  => "Podcast")
end
This entry was posted in itunes. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • What’s this all about then?

    rb-appscript is a powerful way to automate your Mac. It's similar to Applescript but it's built in Ruby, which means you get to leverage that language's powerful syntax and libraries. Giving you more time to make toasted sandwiches. You want long-winded explanations? We got those.

    Please note that these scripts are by no means bulletproof, and are intended to provide examples of application scripting. I take no resposibility for any loss of data or mishaps; you download and run everything at your own risk. That said, I use all of these scripts in a production environment every day (well – more accurately, I use some of these scripts in a production environment most days).