A Home for Wayward Podcasts

December 1st, 2005

Anybody who uses iTunes to acquire “podcast” audio files knows that there are some major perks to using iTunes for this purpose as opposed to simply downloading the mp3 file with NetNewsWire or your web browser. The biggest advantages to me are:

  1. New iTunes podcasts are automatically transferred to your iPod
  2. Old (already listened to) iTunes podcasts are automatically removed from your iPod.
  3. “Legitimate” podcasts show up in a special “Podcasts” section on your iPod.
  4. Your iPod and iTunes “remember where you were” when you stop listening midway. (Update: See bottom of entry.)

These relatively modest improvements to the regular “mp3 listening” process don’t exactly make managing and listening to podcasts pain free, but they help. When you are forced to abandon them because your “looks and talks like a podcast” mp3 file doesn’t happen to satisfy iTunes’ idea of what makes a podcast, the absence of these features becomes extremely annoying!

I often come across a “podcast episode” that is packaged as a simple mp3 link on somebody’s web page. Or I decide that a particular episode from a regular feed is intriguing, but I don’t want to subscribe to the whole feed just to get that one episode. Maybe I don’t *want* to listen to all the other episodes in that feed! In these situations, a highly annoying fact of life is that iTunes will not be coerced into treating a plain mp3 file as a podcast episode.

Grr!

A Solution: Typecast 1.0 Beta

These are the types of nuisances that regularly cause my “project ideas” list to expand to such length that few items have any hope of ever being implemented. Usually I just grind my teeth and work around the problem the way everybody else does: with sweat and tears! In this case, however, I found the limitations of iTunes to be a threat to my way of life. I need to have those plain mp3 files treated as Podcast episodes. I will have my way with iTunes.

I am happy to announce Typecast 1.0 Beta a FREE utility for performing one particular feat of daring: slamming arbitrary audio files into a “faked-to-order” Podcast subscription for iTunes. This is surprisingly hard to do, because iTunes doesn’t provide any mechanism (that I could find!) for coercing arbitrary audio files into podcasts. So what’s my secret? Believe it or not, I had to implement a custom HTTP server that, from within Typecast, listens on a high-numbered port. I then compose an RSS-format feed for the user-specified files and URLs, before sending the subscription request for this “fake” podcast directly to iTunes. The number of nasty workarounds this product’s implementation required is really depressing. Fortunately for you, they’re all hidden behind the exceedingly clean and friendly interface of Typecast.

Still don’t get what this is good for? Looking for an example page to try it out on? Check out CIO’s interview with Joel Spolsky. See the link that says “Listen to the Podcast” (replicated here for your convenience)? Now, how do you get that into iTunes as a Podcast episode? You can’t drag anything to the Podcasts playlist. You can’t AppleScript it. You can’t subscribe directly to an mp3 file. You can’t invoke some secret iTunes URL scheme. You can’t do it! Sucks to be you!

Now, download and launch Typecast. Left-Click and drag the mp3 link directly from Safari to Typecast. Tweak the titles and descriptions to your liking (or don’t), and “Send to iTunes.”

Suddenly it’s real easy. And I can cross an item off of my “fix the nuisances” project list.

Quirks and Caveats

This project is sort of on the borderline between “clever hack” and “usable product.” I’d like to think of it as a “clever hack with unusually smoothed-down edges.” Nonetheless, there are some disclaimers to be made.

One feature of this application that may annoy you is that every time you “Send to iTunes” it produces a new subscription in iTunes, instead of updating an existing one. This limitation is the fall out of relatively poor scripting support in iTunes for podcast-specific control. The very limitations that led me to produce this solution also limit my ability to do it perfectly. I have chosen to opt for a philosophy that allows me to at least “do what I do well.” Since updating the “fake podcast” once it is absorbed into iTunes is “difficult to impossible,” I’ve adopted the policy that every Send is a unique “fake feed.”

Although this has the unfortunate effect of causing multiple “subscriptions” to show up in iTunes, they will all be merged into a single “show” on your iPod. For instance, I publish wayward podcasts to iTunes under the podcast name “My Rescued Podcasts.” When I’m listening through my iPod, all the various podcasts I might have added with that fake subscription get unified into one choice on the iPod.

Typecast is the server! This is important, because it means that iTunes has to finish downloading everything specified in your pseudo-podcast before you quit Typecast. It also means that every future attempt to “update” a podcast injected in this way will quietly fail. No big deal, but you should know about it.

The Future of Typecast

Do you like this solution? If so, let me know. The future of Typecast is largely dependent on your expression of interest. Possibilities for future enhancements could include AppleScript support, multiple podcast documents, and my delving deeper into the possibility of convincing iTunes to “update” a previously sent Podcast. Heck, someday Typecast might even get an icon! (Like Typecast and have a knack for graphic design? How about contributing an icon? Leave a comment or contact me directly if interested).

Update: One of the cited benefits of having iTunes treat an arbitrary audio file as a podcast, that the iPod and iTunes share a memory of when you stopped listening last, is actually easy to apply to any iTunes file track. Just use AppleScript to set the “bookmarkable” attribute of any tracks you want to behave in this way. Good to know!

11 Responses to “A Home for Wayward Podcasts”

  1. Brian Webster Says:

    Cool! I ran across exactly this same problem myself, but never got around to doing anything about it. My idea for handling ran a little differently though. My idea was to make an Applescript that you could attach as a folder action to a folder. You could download the mp3 files you want to listen to into that folder, triggering the Applescript, which would then iterate the contents of the folder and generate an RSS feed pointing to those files as enclosures, saving the feed to that same folder. Then you just subscribe to that feed in iTunes with a file:// URL and that’s that.

    The first problem, of course, is that iTunes doesn’t seem to take file:// URLs. An easy way around that, though, is to just turn on personal web sharing and then put the feed in the Sites folder in your home folder. You can then subscribe to http://localhost/~username/feedname.xml. I suppose in that case the mp3 files would have to live in the Sites folder too, in order to download them properly.

    The advantages to this method as I see it are that it’s automatic, since simply downloading a new file to the folder will regenerate the RSS feed, and you can keep the same feed in iTunes instead of having to add a new one each time. You would have to find a way to enter stuff such as the name, description etc. though. I guess you could do that with Applescript dialogs. Not pretty, but it would get the job done.

    Since Typecast already has the feed generation code done, some simple Applescript support would let a folder action just open up Typecast and tell it the folder to work with, and then Typecast could do the heavy lifting from there.

  2. Daniel Jalkut Says:

    Brian: Yeah, the failure of iTunes to handle “file:” URLs was a real obstacle. That’s what led me to implement the solution as an HTTP server. I didn’t want to require the user to turn on Personal Web Sharing. Of course, a major advantage of using Personal Web Sharing would be that the podcast could update even when Typecast is not running.

    (Side note: iTunes won’t even accept a file: URL for a podcast’s *content*, which means that when you drag an item from the local disk I have to “reflect” the file, providing iTunes with a bogus URL that points at Typecast instead of a local disk file: URL.)

    The major rationale for my not just “updating the existing” subscription is that there’s no way for me to get iTunes to update a particular podcast “right now.” I have to ask it to update all podcasts, which can be quite a lengthy operation.

    If people express interest, it might be worth “daemonizing” the Typecast server so that it can handle update requests at any time – even when Typecast is not running. This would improve the user experience a lot and allow “podcast configurations” to exist independently of the Typecast application running. If this project ends up surviving, then I will definitely make sure to allow AppleScript access to the configuration “heavy lifting” as you suggest. For the first release, I wanted to keep it as simple as possible because I’m still feeling out whether anybody else will find this app useful :) I’m glad to know that there is at least one person!

  3. Beau Hartshorne Says:

    Great idea! That always irritated me.

  4. Brian Webster Says:

    Wow, it doesn’t even handle file URLs in the feed? That’s severely bogus. Time to fire up the bug reporter. :-)

    Daemonizing the Typecast server might help, although if it were triggered by Applescript, it could just launch, do its thing, and then quit again. For my own usage, since I’d ideally like to have the whole thing just work automatically in the background (kind how normal podcasts do), doing a complete update of all podcasts wouldn’t be a problem. I’d rather have it go update everything than end up with a new subscription each time it ran. I guess another method would be to have Typecast run in the background and watch the folder itself, so you wouldn’t have to mess with folder actions and all that.

    BTW, I’ve done a couple updates on my machine with the beta and it’s worked fine so far. Ship it! :-)

  5. Daniel Jalkut Says:

    Yeah there are a bunch of iTunes bugs swimming around in my head. It’s a bit overwhelming. I would report them all but I’ve been too busy working on Typecast :)

    One thing I like about running my own HTTP server is that I can be extremely finicky about what gets handled. I think this decreases the security risk for users vs. enabling Personal Web Sharing – though I may be kidding myself. My HTTP server only responds to a couple GET commands. doesn’t let you POST, or relay, or anything like that. I also like the way that, by handling all the requests myself, I don’t have to ensure that the RSS files get to any particular place – in fact, they don’t even have to exist as files. Most of all I don’t want to have to tell a user “you have to turn on personal web sharing to use this.”

    Thanks for the feedback about the well-functioning. I think I’m leaning towards the nuisance of the duplicate feeds being a “1.0 killer.” If I can’t fix that then it might be a beta forever :)

  6. Matt Schinckel Says:

    I’ve got some older files I’d like to add to the subscription they really belong to, so I’d be keen to see this feature, plus the abililty to set the release date.

    I’d also love to help in any way I can. I’ve done a fair bit of AppleScript hackery with iTunes, if that helps!

    P.S. The checkbox width is also wrong in FireFox. Try using:

    p #enablePreviewCheckbox
    {
    width:12px;
    }

    in your Stylesheet.

  7. Matt Schinckel Says:

    Sorry, the feature I meant was “inserting” them into an old subscription, if it isn’t clear.

  8. Matt Schinckel Says:

    The major rationale for my not just “updating the existing” subscription is that there”™s no way for me to get iTunes to update a particular podcast “right now.” I have to ask it to update all podcasts, which can be quite a lengthy operation.

    Select a podcast ‘album’, or any file from a podcast, and then use the following AppleScript to update just that Podcast:

    tell application “iTunes”
    repeat with trk in selection
    updatePodcast trk
    end repeat
    end tell

    My plan is to write a script that:

    a) changes the URL of the selected podcast.
    b) puts the currently selected Finder files into the right place
    c) generates an XML file with the right info, in the right place
    d) updates the selected podcast
    e) puts the old URL back

    Do you think this will work?

  9. Paint the Tiger • Carve the Swan » Importing Older Podcast Episodes Says:

    […] Red Sweater Blog to the rescue. Daniel has written a program called TypeCast, downloadable from the page A Home For Wayward Podcasts, which can sort-of solve the problem. You can set the relevant data in the Podcast, such as name, and description, but not the release date. Nor will it add the file into the previously listed subscription, instead creating a new subscription each time you import it. Apparently these multiple subscriptions, if the have the same name, will only appear once on the iPod, but surely there’s a better way. […]

  10. Daniel Jalkut Says:

    Matt – I am glad you have taken a late interest in this application :)

    The updatePodcast “track” trick does seem to work. I wonder if that was fixed recently or if I just overlooked it. I probably tried to use it on, you know, a podcast album or something.

    So I will take another stab at updating individual podcasts as they’re published from Typecast. It would definitely be the coolest if it could revise podcasts in place.

    As to your idea injecting an episode essentially into a podcast you don’t own, I think your trick might work. If only because iTunes does seem to be kind enough to keep around old junk even when the server stops including it in the feed. So yeah once you go back to the real feed I think you might be OK. I will look into this, too.

    It should be easy for me to add “Date” to the list of things I allow the user to update. Right now I just use the current date or something I think.

  11. Matt Schinckel Says:

    I can’t believe that noone else had come up with an application like this!

    I have managed to insert older tracks into an existing podcast – it works really well, but is not at all automated. I may automate it, but since it requires a restart in order to get the hostname redirect to work properly, it’s not all that user-friendly.

    It’s also useful if you accidentally deleted a podcast episode, but want to reimport it.

Comments are Closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.