Post Reply 
Happy Birthday, MinimServer!
04-02-2013, 00:46
Post: #14
RE: Happy Birthday, MinimServer!
(03-02-2013 21:20)simoncn Wrote:  I'm impressed that you could parse the "iTunes Music Library.xml" file and export .m3u playlists in only 30 lines of code.

I'm hoping to add support to MinimServer for .m3u playlists soon. As well as your Python script, it seems that iTunes has the capability to export playlists to .m3u files (see this page). This .m3u approach could provide a first step towards making iTunes and MinimServer work together.

Nothing to be impressed about, the Python standard library includes a very good tool to handle plist files which are basically dictionary type data structures encoded in xml, so the translation into a Python dictionary comes for free. From there on it's just looking up the filenames for every track of a playlist.

A quick Google search turned up two Java libraries for handling plist files: http://code.google.com/p/plist/ (MIT license) and http://sourceforge.net/projects/plist/ (LGPL).

Exporting from iTunes would require a lot of manual interventions every time a playlist is changed (including iTunes' 'smart playlists'), so I went for the scripted approach to get all playlists in one go.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Happy Birthday, MinimServer! - Manul - 04-02-2013 00:46

Forum Jump:


User(s) browsing this thread: 1 Guest(s)