iTunes (Windows) Podcast fix


iTunes is pretty decent for Podcasts. In fact, Lifehacker readers rated it the best.  However, it has some shortcomings, to be sure.

The one that annoyed me the most is if you have a RSS feed of say, PDFs or ePubs like the magazines at jw.org, you can subscribe in iTunes whereby it will happily auto-download (and sync) them for about 3 or 4 months and then silently stop.  It expires those subscriptions because it thinks you haven’t “listened” to them for that long, so you must not be interested in them anymore.  Reading an ebook, even when synced to iTunes does not update the play count, so you have to manually re-enable them.  There is no way to disable this feature, or adjust the expiration interval.

On the Mac, you can download “Update Expired Podcasts” from the wonderful Doug’s AppleScripts site and schedule that, but on Windows, a little more complicated.

Will Perry posted a couple of decent scripts (v1 here and v2 here) that gave me an excellent start, but I ran into two big problems.  One was that it kept throwing an error implying that the track was not an object, so item.podcast was invalid (?). Another problem was that once I found the item, it refused to update it, claiming it was not modifiable.  I think something in my library must be corrupted or the metadata is incomplete… or something.  In any case, I took a hybrid of those two and added a dumb “on error resume next” statement and came up with something that works.

I also added a simple condition to update only the eBook formats, but leave the audio podcasts alone.  If you want, you can remove that condition.  Note that updating the file in this way does not affect the “Read” status – so you can still keep track of what you have read or not read!

Here it is.

set iTunesApp = CreateObject("iTunes.Application")
on error resume next ' Don't try this at home kids
set libLibrary = iTunesApp.LibraryPlaylist

for each track in libLibrary.Tracks
  if track.podcast And (Instr(track.Description,"PDF") Or Instr(track.Description, "EPUB")) then
    if track.PlayedCount = 0 then
      track.PlayedCount = 1
      track.PlayedDate = now
    end if
  end if
next
,

Leave a Reply