Chris tells you how to set it up to keep only unplayed podcasts, but I personally find that occasionally I download podcasts where they mysteriously are flagged as "do not allow auto delete". In those cases, you have to manually change them to "allow auto delete" (control-clicking on the tracks), or else regardless of what you do with Chris's procedure, they won't automatically remove themselves.
I find it very annoying that sometimes podcast downloads are flagged as "do not allow auto delete" (I'd guess it happens less than 5% of the time, but still annoying). But, I personally listen to my podcasts on my iPhone, so in addition to the setting Chris talks about, I also flag my iPhone to only transfer unplayed podcasts. That way, regardless of the "allow auto delete" setting in iTunes, even if they're not auto deleted from iTunes, at least they're removed from my iPhone.
But if you're listening to podcasts on iTunes on your computer, if you have podcasts that sometimes come through as "do not allow auto delete", you have to manually switch them to "allow auto delete" (or just manually delete them).
This may be too complicated for you to contemplate, but I also have written a AppleScript that removes podcasts that have been played (in case they're set as "do not allow auto delete"). I have that script run at a scheduled time every day (it also updates my podcasts so they're ready for me when I get up), and that takes care of it for me. So I now no longer have to worry about whether the podcast was downloaded with "allow auto delete" flagged as on or off. Worst case, they're cleaned up for me once a day. AppleScripting (or Windows COM VB scripting) isn't hard, but it isn't for the faint of heart, either. But I mention it as an option. But realistically, we really should have to deal with this silliness.
Yeah, I've seen this with
Talk of the Nation, too. A few of my other NPR podcasts occasionally suffer from the same symptom.
In terms of making life easier, the only thing I can say is that whenever you find a played podcast that isn't getting deleted, you can just highlight all of the podcasts (command-A) and select "Allow Auto Delete". That won't affect the ones that are already flagged as "Allow Auto Delete", but saves you the effort of going through the list and figuring out which ones are appropriately flagged and which ones aren't. This is, of course, assuming that you don't have some downloads where you want to turn off auto delete...
ctrl A and mark as allow doesn't work in IT9.1, nor does selecting the subscribed podcast and telling it to allow auto delete, you have to now select each and every episode separately and allow it.
Many of the podcasts I listen to are also afflicted with the "Do Not Auto Delete" flag. Losing the ability to do a bulk "Allow Auto Delete" is deeply annoying.
I tried to throw together an Automator service as work-around, but got stuck. Anyone here have ideas how to create a stop-gap solution?
You can have an AppleScript that deletes played podcasts. I have my machine do this automatically every morning (after it downloads podcasts, so it's ready to go first thing in the morning):
tell application "iTunes"
set nothingDeleted to false
repeat until nothingDeleted
set nothingDeleted to true
repeat with podTrack in file tracks of user playlist "Podcasts"
if played count of podTrack > 0 then
delete podTrack
set nothingDeleted to false
exit repeat
end if
end repeat
end repeat
end tell
You can either use osascript to create a cron job to run this in the morning. Or you can invoke it manually from the iTunes AppleScript menus. A variety of options. If you're interested in specifics, let me know.
(By the way, I'll apologize in advance as I'm an AppleScript newbie, but this does the job for me...)
It does contain your sample AppleScript, admittedly republished without your permission, so let me know if you want me to take it down.
The service I put together first moves the files to the Trash, and then runs the deletion loop on the podcast list. This seems to successfully clean up the list in iTunes and takes care of the file on disk.
It's a Snow Leopard service, I don't know if it will run on earlier versions of OS X.
That's great. If you incorporated my AppleScript in your Automator service, I'd only ask that you give me appropriate credit where you've used my script. But you certainly have permission to use it and integrate it into your Automator service. That's why I posted it here, so people would be free to use it as they see fit. Glad to see that it was helpful.
By the way, I've discovered that the context sensitive menu for "Allow Auto Delete" will appear if you select multiple podcast downloads (even across multiple podcast subscriptions) if and only if the first item selected is an actual download, not the subscription. So, while this does not work:
FYI, I've updated my AppleScript to not only delete played podcasts, but also move the underlying media file (e.g., the mp3 file) to your Trash. You may find the updated script here.