How does one a base a podcast playlist off of release date?

I'd like to be able to make a playlist that is all recently released podcasts.

Unfortunately release date is not a field available for selection in a smart playlist in iTunes.

Similar-ish dates like date added and modified date won't be close to release date when downloading the back-catalogue of newly added podcast.

The best solution I've come up with is to close itunes, truncate the iTunes Library.itl file, copy the release date field values in the iTunes Music Library.xml file into the date added field, and then relaunch iTunes, and letting it rebuild the itl file from the xml file.

However, my library file is large enough that the rebuild takes 20-30 min, and even with no hacking of the xml, fails more often than not.

Is there a method for me to either or both of:

  • hack the itl file to set the date added to the release date?
  • be able to select the release date either in rules for a smart playlist or the "limit to... selected by" dropdown of a smart playlist?

I'm not much of an AppleScripter, so this is modified from some scripts at Doug's AppleScripts website, but it's GPLed, so derivative works are allowed as long as they're also GPLed.

My idea was to make a script that could take the release date, which can't be used in smart playlists, and store it in the last skipped date, which can be used in smart playlists. If you just want to do this for podcasts (not for songs, for which you might actually use the last skipped field), just select your podcasts before running this script.

Once you do that, you can create a smart playlist selected on the "Last skipped" field to get the recently released podcasts.

enter image description here

So here we go:

 (*
 You can rename this script to whatever you want
 but please keep this information intact. Thanks.

 This program is free software released "as-is"; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

 Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

 or visit http://www.gnu.org/copyleft/gpl.html

 *)

 tell application "iTunes"
set sel to selection
if sel is not {} then
    set ofi to fixed indexing
    set fixed indexing to true
    repeat with thisTrack in sel
        set reld to release date of thisTrack
        tell thisTrack to set skipped date to reld
    end repeat
    set fixed indexing to ofi
else
    display dialog return & "Select some tracks first..." buttons {"Cancel"} default button 1 with icon 0 giving up after 15
    return
end if -- no sel    
 end tell

@Daniel's answer lead me to a working solution, so I'll post it up

Using windows means that the apple script solution wasn't going to work, and so using the iTunes.Application com object my solution looks something like this (in Ruby, cause I like Ruby, though other scripting languages will work too).

require 'win32ole'

def main()
    itunes = WIN32OLE.new('iTunes.Application')
    allpods = getallpodcasts(itunes);
    allpods.Tracks.each do |track|
        track.PlayedDate = track.ReleaseDate
    end
end


def getallpodcasts(itunes)
    itunes.LibrarySource.Playlists.each do |playlist|
        return playlist if playlist.Name == "All Podcasts";
    end
    die "'All Podcasts' not found"
end

main()
  • I create a playlist called 'All Podcasts' and make it just that.
  • I have to use played date as my proxy for release date, as that is the only editable date field on a track in the COM object version of itunes.

Interestingly iTunes does not equate "has a played date" with "has a played count > 0" so I can now have a playlist of podcasts that are unplayed, that meet whatever criteria I was using before, and that are selected by release date.

Yay!


I probably have a workaround. Create a new smart playlist based on Media Kind is Podcast. Add additional criteria if needed. Sort this playlist by column Release Date.

If you need to listen to it on iPod by Release Date also then Choose Copy to Play Order from the context menu of the playlist. Sync the playlist with iPod. And start playing them from this playlist.

Please report if this work since I'm not able to find my cable right now to check if this really work.

P.S. Playlist will include not only recently released podcasts of course but you can limit it size either by track, size or time additionally to other filters.