Friday, June 5, 2009

Introducing the iTunes Playlist Converter (with C# and LinQ)

Here’s the scenario that needed a solution:

  • My wife and I both have our individual PCs with our music collections (not too much overlap between us ;-)). Originally it was mostly ripped CDs but since iTunes und Amazon started selling MP3s without any DRM, we’ve mostly switched to “digital downloads”.
  • We also have a Noxon “internet radio” in our living room so we can listen to Internet streams through wireless LAN.
  • Occasionally we also want to play music from our individual collections (e.g. background music for parties, especially “seasonal” music at Christmas) on our living room stereo.

We could have copied the MP3s to a thumb drive and hooked that up to the Noxon, but that sounded a bit manual. (C’mon - you buy your music digitally from Apple or Amazon, it gets delivered to your PC from America or wherever, but in order to play it on your stereo you have to “sneakernet” it to the living room!) So I was looking for a better solution …

After looking around a bit, I tried TVersity. It is a “streaming server” using the UPnP protocol. TVersity publishes a list of available media to the Noxon, and can stream titles or playlists that are then played on the Noxon using my local wireless LAN.

TVersity even works on my Windows Home Server. So just copy all our music on a regular basis to the Home Server where TVersity can find it, and your almost done. This works great for individual titles and full albums, but playlists don’t.

First, we both use iTunes to manage our music, and iTunes has its own way of storing the playlists (using one larfge file an XML format, and it’s a format that is not supported by the Noxon which uses an individual M3U file for each playlist). Second, all the references in the playlist are to files local to each PC and that is different from where the files are stored on the home server.

A good scenario to try out some C# programming! Also, as iTunes uses an XML file to store all its information, I could play around with LinQ to query the contents.

The book I used to get up to speed on LinQ was this:

I found this to be quite well written, but I needed the work of “doing it myself” before I was able to figure out which parts I had not quite understood. Pretty normal for anything new!

Next: A first look at the PlaylistConverter

1 comment:

  1. MusConv.com is the best way. I am already using this and this is just an amazing way and everything get synced automatically. There you will get an app for your PC and Laptop. MusConv is totally free.

    ReplyDelete