iTunes/iPod Podcast handling

I can’t remember exactly when, but at some stage in the not too distant future, iTunes/iPod Podcast handling got a whole lot better. It used to be that if you started to listen to a Podcast, it was marked as “Not New”, and was no longer synced to the iPod. This is no longer true - it now syncs all Podcasts that have a play count of 0. It kinda caught me a bit by surprise, when I came across some Podcasts I was sure I’d listened to, and when I played them, I only got the last few seconds. I must have started a new track playing before the end.

BBC Radio 4 - Comedy - Hut 33

BBC Radio 4 - Comedy - Hut 33:
Hut 33 is a new sitcom from the award winning creators of Think the Unthinkable
And, I don’t seem to be able to get realdump to work properly to grab it. Not that I’d have the first few episodes, anyway. I have to just hope that the ABC decide to play it, and I remember to listen…

Adding a Podcast to a pre-existing Subscription

Under iTunes, Podcast handling is (mostly) an inspired technology. Podcasts _are handled slightly differently to normal audio, or _Music _files, and differently again to _AudioBooks, and Movies. All of which makes perfect sense, as all of these types of files have different purposes. For most people, a Podcast is something they might listen to once, and then discard. I’m not most people. I’m a hoarder, and thus I like to keep of the Podcasts I’ve downloaded. And I like them to be well organised. That means all properly tagged, with reasonable titles. I may want to listen to a particular Podcast again, such as the amazing 000 Emergency episode of Radio Eye (from Radio National), or burn it to a CD to play for students in a class. I’ve also found some MP3 files that are part of a particular Podcast, but have long since been removed from the RSS feed that tell iTunes what files are available. I’ve downloaded these, but needed to be able to get them into iTunes, and make sure they appear in the relevant Subscription. I’ve discovered a way to do this, but at this stage it is a manual process, and can become quite time consuming with many files. You will need the following things to be able to perform this trick nicely:

  • All of the music files you intend to import.
  • A copy of the XML file that is the basis of the subscription.
  • The hostname and path of the subscription.
  • An http server.
  • The ability to change hostnames, so as to cause software to look in a particular place for a server, rather than using DNS.

I’ve done all of this on a Mac, and the instructions below will reflect this. It is possible to do all of this on other systems, but the steps may vary, especially redirecting the requests to your own server. A note will be made of this. The first thing to do is to ensure that your computer has a working Web Server. If your web browser will not report anything working when you try: http://imac/ (or whatever your computer is called), then you will need to enable the server. Under MacOS X, open System Prefences and choose the Sharing tab. Find Personal Web Sharing in the list, and turn it on. You may need to Authenticate as an administrator in order to do this. Now, you need to grab the XML file. Open iTunes, and select the Subscription you wish to add files to, and Ctrl-Click. Choose Show Description from the popup menu. Record the URL. Download a copy of this URL using, for example wget from the terminal. In my case, the command I used was: $ wget -c The URL contains a fair chunk of the information we will need later, so I’ll explain what everything in the above example means:

  • http:// - the protocol used. This will always be hypertext transfer protocol, as this is the only one that iTunes understands.
  • - the name of the server. We will trick iTunes (and every other application, incidentally) into looking on our computer for this server later.
  • /rn/podcast/feeds/ - the directory structure on the remote server.
  • mind.xml - the name of the XML file that stores the suscription information.

We now need to set up the files in the right place. Find the root directory of your web server. For a Mac, this is likely to be /Library/Webserver/Documents/. Create a new directory within that one, in my case it was called rn. Then create a new directory inside that one, in this case podcast, and so on. Do not create a new directory with the name of the XML file, instead move the XML file into this last directory. Move the audio files into this directory also. Now, open up the XML file in a text editor, and examine it’s contents. You will need to change the values of a heap of stuff in the <item> section(s), ensuring all of the information is accurate. It’s fairly straightforward, but I’ll summarise them anyway.

  • title - The _Title _as it will appear in iTunes. You can edit the title of a Podcast after it has been downloaded.
  • description - This appears in the _Description _field of iTunes. There seem to be issues with extended characters of some sort. You seem to be able to have a longer description if you have it in the XML file than if you try to add it later using AppleScript.
  • link - the URL of the file.
  • pubDate - the Released Date. Make sure it is a valid date, and the correct one for the Podcast to ensure they appear in the right order within iTunes/iPod.
  • enclosure -This one has three parts that must all be checked.
    • url - ensure it is the same as the value in link (above).
    • length - this must be the exact size of the file in bytes. This can be obtained on a Mac by using the Get Info command.
    • type - chances are this will already be correct, but if you aren’t using MP3 files, then ensure this reflects that.
  • guid - appears to be the title + the pubDate. I assume that this field is used to see if files are the same. I haven’t experimented to see. I suspect it can really be any value, as long as it is unique within this subscription.
  • itunes:author - The value to go into the iTunes Author field.
  • itunes:summary - iTunes Comment value.
  • itunes:duration - The duration in seconds. Again, available through the Get Info window.

Of these, really only enclosure, link, guid and duration are important for now: the remainder can be changed using iTunes later. However, if you have a long description, you might not be able to get it all to appear if you use AppleScript to change it later. I learned this the hard way, and now change the description in the XML file. Now we are up to the tricky part. You need to tell your computer not to look online for a particular server anymore, but to look at your own computer. On a Mac, this is done using NetInfo. Open the / domain, and find machines. Copy the entry localhost, and edit the name so that it reflects the domain name of the server the Podcasts normally live on. In my case, this was If you are using a different OS, you may need to edit /etc/hosts, or the Windows Hosts file. Save your domain. To get the computer to use the new settings reliably, you need to be ‘offline’ - easy for me since I’m on dialup. You will also need to Restart Netinfo Domains after going offline. It may take some time to do the lookup (which has to fail before it looks in the local domain list - which seems to be contra to how I would expect it to work), but after this it will be speedy. Then, simply start up iTunes, and update the required Subscription. It should (very quickly) download all of the podcasts that are ‘new’ - although you may need to manually download them depending on your settings. Finally, reload NetInfo, and remove (or better, rename) the server name you entered before. Don’t use something like, as this is still something that may be used by the company. Instead, put a 2 at the end, so it makes the domain name invalid. You may need to restart, I just connected to the internet, and the server in question worked perfectly again. You can now remove all of the files you no longer need - all of the MP3 files will have been copied to your iTunes library. You may wish to hang onto the XML file, incase you need to repeat this for future episodes.

Podcast Listening

What is the verb for listening to Podcasts? Creating them is called Podcasting, but what about consuming them? Update: Apparently, this is called Podcatching. I do remember hearing this now, just not for a while.

Nova: 91-point-crap

We’ve had Nova 91.9 playing while we’ve been painting the last couple of nights. Some of the music is okay, but last night I noticed they are playing exactly the same songs as the night before. That’s okay - the young folk today are so whacked out on drugs (prescription, as well as recreational) so they probably don’t remember that these songs were on last night too. After about three hours, I realised they were playing a whole heap of songs for the second time that night! I mean, come on. You needs to smoke shit-loads of drugs to forget the songs that played in the last three hours. And it wasn’t just one or two, but more like all of them. Are the programmers so lazy they only program half a night worth of music, and just play it all twice? I want that job!

iPod Freezes with 3.1.1 Firmware

I’ve had some serious issues with my iPod after updating to the latest iPod firmware (3.1.1). Basically, it keeps freezing, either when going into sleep mode, or coming out of sleep mode. It’s not possible to determine which of these it is, as there is nothing appearing on the screen when pressing any buttons, or plugging in the headphones. The only way to get the iPod back to normal is to do the two-finger reset: hold down _MENU _and _SELECT _for about 5 or so seconds. This then resets the iPod, and it boots up as normal. However, any information (like which songs and podcasts I listened to) is lost. Meaning I then need to remember which podcasts have been listened to, and remove them manually from the list. According to some web sources, this occurs only when having just listened to a podcast, but I don’t seem to be able to replicate that right now. I know it crashed last night after listening to an Audiobook, but I can’t recall if it ever happened after just plain music. However, I do know that this problem only reared it’s ugly head after updating to the 3.1.1 firmware. I wonder if it’s possible to downgrade iPod firmware? Apparently it’s just a matter of editing a value in iPod_Control/Device/Sysinfo, namely buildID, to a value less than the firmware you want to downgrade it to is. Of course, you’ll need the updater for that firmware version, too. If I keep having issues, I may have to try this. Update: This technique doesn’t work: or at least I couldn’t get it to work. I’ve just used Restore with an older updater, so I’ll see if that was the problem. I’m now using 3.1, but I’ve got to wait until all of my music re-syncs back to the iPod, as Restore ‘cleans’ the iPod.

Ricky Gervais Podcast Archives!

Ricky Gervais This site has the archives of the Ricky Gervais podcast. I’ve removed my listings of the URLs, as they are changing from time to time, so visit the link above to download them all. I may still create a feed XML, but I may not…

Bypassing iTunes Downloader

My biggest hate about iTunes is that if the download of a Podcast fails, it needs to restart the whole download, rather than just resume. This really sucks if you are 21Mb into a 22.5Mb download. Using the technique illustrated in Adding a Podcast to a Pre-Existing Subscription, it’s possible to download the files in another program, such as wget, which can handle resumes. It also tends not to drop out as much as iTunes does when the network is congested. Which it is automatically when three downloads are concurrently occurring. There are some changes that need to be made to the process, but these are really just simplifications. You need to know the URL of the file you want to get, which can be obtained using the following AppleScript:

1    tell application "iTunes"
2        set the clipboard to address of item 1 of selection
3    end tell

Then, set up your http server, and create the same directory structure from your server root. Go to the relevant directory, and download the files you want to grab. Finally, go offline, and point the domain(s) at your own computer. Go back into iTunes, and use the GET button to grab the files from your own ‘server’. Don’t use the Update Podcasts button, or an error may occur. This removes the need to recreate the XML file, which is the most labour intensive part of the process illustrated in the previous post. It works a treat.

Changing a Feed Location

I’m pretty happy with the way I’m creating pseudo-Podcasts of ABC programs that are available in RealMedia only: I use a program called realdump, which calls mplayer, to dump the audio to a .WAV file, which I convert to AAC using faac. I then get the data from the web page, and create an entry in an XML file. This in itself isn’t that tricky, but the clever part, at least in theory, is that I chose the URL I think the ABC might use when they finally Podcast that programme, and have a hostname entry for, which I use when I’m not online. However, every program I have done this for has chosen a different URL than the one I chose. For instance, The Philosopher’s Zone has chosen: instead of: which is closer to the RealMedia file names, or: which more accurately reflects their URL naming scheme. Apparently it’s possible to redirect a feed, so that iTunes then looks in a new location, using something like 301 redirects. The problem is I can’t get apache to do this, for some reason. I’ve tried using .htaccess files, but they don’t seem to do anything. I think Apple should make it so that a permanent redirect can be placed in the XML file, and iTunes respects this for future checks.

Podcasts can be TV too!

I’ve stopped downloading the Chaser podcasts, since the quality is too poor, and I want to keep those for posterity. However, as a bit of a whinge, it did make something clear to me. Apple thinks podcasts can’t be TV shows, or movies. If you try a Get Info on a video podcast, and wish to make it into a TV show, so you can organise it properly within your library, you can’t. This option is grayed out in the Video tab.

Pass In Time • “Central Reservation” • Beth Orton