Skip to main content
Enthusiast I
July 6, 2009

iTunes Library Manager

For Sonos users who wish to choose which of their iTunes playlists are transferred to Sonos or for users who wish to use lossy formats for their ipods and lossless for their Sonos system. It makes a custom XML file on the NAS with unselected playlists removed and/or references adjusted to the lossless files. If you wish to only transfer a subset of playlists the application can be configured to display a playlist selector before the custom XML file is generated. The application can be configured to run and create the custom XML file on your NAS each time iTunes is closed.

http://www.darrenlink.talktalk.net/ituneslibrarymanager

http://www.darrenlink.talktalk.net/ituneslibrarymanager/download

I have written an application that solves two main issues for Sonos and iTunes users. Many people like to use iTunes to catalog their MP3 collection for use with iPods but prefer to store lossless files (perhaps apple lossless) on their NAS for use with Sonos. The "iTunes Music Library.xml" cannot be simply placed on the NAS as all the tracks are pointing to the lower bitrate MP3 files. Also many iTunes users have too many playlists to be imported into the available Sonos memory. (Especially if lots of smart playlists covering your entire library are defined)

My application solves the above two problems by changing the paths of the MP3's (or other lossey file types) within the "iTunes Music Library.xml" to the equivalent paths of the lossless files. It also allows the user to choose which playlists they wish to be imported into their Sonos system from their iTunes library. It also eliminates the need to maintain two separate iTunes libraries (although you are still required to create lossey and lossless copies of each track)

The application caches (and maintains) a one to one mapping between each file in iTunes with the equivalent higher quality file on your NAS. This caching allows the application to run through approximately 10,000 tracks on my PC and write an alternative xml file to my NAS pointing to the lossless files within about 25 seconds.

The application is completely configurable so it can be configured to match your setup.

More information, screenshots and the download link are above.
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

111 replies

Enthusiast I
January 8, 2010
All,

I have posted a new version (2.59.2) tonight which has better error handling whilst processing the tracks within the source XML file. If an error occurs processing a track the application should now report details about the error and also give details about the track it failed on.

Gordon,

Glad you are no longer getting the earlier error whilst the application was processing the tracks. The above error handling would have been useful if you were continuing to get that earlier error.

It's excellent to here that you now have the application working for your system. You are the first person to report success with my app, which is music to my ears. :):) :) I hope you find the application as useful as I do going forward. It's good to hear it working fully with FLAC files as the majority of my use/testing has been with Apple Lossless files. (I did create 1 FLAC file and did 1 test but not extensive testing)

Before I developed the application I was frustrated about playlists not importing because I had too many iTunes playlists for the available Sonos memory. I also didn't want to maintain playlists in both a lossey (mp3) and lossless (Apple Lossless) iTunes library. Now I only need to create playlists in my MP3 iTunes library (the only one I have) in order to get them onto my Sonos system pointing to the Apple Lossless tracks.

Have you tried changing any of the settings under Edit Settings? Now that you have the processing working for your needs you should be able to enable the following features:

Minimize to system tray
Minimize to system tray on startup
Minimize to system tray on close
Listen for closure of iTunes
Sonos Indexer Enabled.

After you have enabled these settings the application can run in the backgroud continually (if you wish) and kick in when iTunes closes. I recommend creating a shortcut to the "iTunes Library Manager.exe" and placing it in your All Programs -> Startup folder. The application will then start when you start windows and will be minimized to the system tray. If the notification messages become annoying you can supress them under Edit -> Settings (Surpress all system tray notifications)

Now onto your issues with window sizes. I haven't encountered any issues with the 'Suggest track match' window. Perhaps you could email me a screenshot to illustrate what is happening? The same applies to the 'Analyse Library' function. I am surprised you are having these problems as the layout looks fine on my Windows 7 machine (although 32 bit). Are you using a non default Windows 7 skin perhaps?

Here is a screenshot of the 'Suggest track match' window on my machine:

http://www.darrenlink.talktalk.net/ituneslibrarymanager/images/non_exact_match_found.png

and also with it resized:

http://www.darrenlink.talktalk.net/ituneslibrarymanager/images/non_exact_match_found_resized.png

Also, here is a screenshot of the 'Analyse Library' function on my machine:

http://www.darrenlink.talktalk.net/ituneslibrarymanager/images/analyse_library.png

Can you see what the differences are? Screenshots from your system would be very helpful. (See my profile page for my email address)

Many thanks for having the patience to set up your files in the necesary structure and for persisting with my app. Your input on your reported issues would be greatly appreciated. Also feel free to suggest improvements to the application.

Thanks again for your patience and feedback.

Darren
Enthusiast I
January 9, 2010
Hi,

Please do not enable the Sonos indexer function in my application for the time being. I have noticed some sluggish behaviour on my Sonos system after using the indexer (within my app) for many weeks and I believe it is causing some instability problems within the application also. Rebooting all zones within my Sonos system fixed the sluggish behaviour. I am looking for a more reliable way of kicking off the Sonos indexer from within C# .Net. I suspect resources are not being cleaned up properly after kicking off the indexer, and that this causes performance issues within Sonos over time.

Please do not let this issue put you off using the application. The connection to Sonos is completely tuned off by default so it won't cause any Sonos performance issues if you do not enable it. If you have already enabled the feature I recommend disabling the feature (for the time being) and rebooting all Sonos zones. Apologies for any inconvenience caused.

I am currently using an adapted copy of Steve Eisner's C# code to kick off the indexer. Sometimes it does not discover all of my Sonos zones so something is not quite right. (It's probably my fault Steve if you are reading this) If anyone can help me adapt Steve Eisner's code so that is more reliable or give me an alternative solution it would be greatly appreciated. I have seen Sonority on the forums but don't know if this application can kick off the Sonos indexer or be adapted to do so. I can't get Sonority running on my Windows 7 system. I also cannot open the Sonority source code as I am only developing in C# 2008 Express Edition, not the full version.

Any help for kicking off the Sonos indexer reliably from C# .Net would be greatly appreciated.

Have fun using the application without the automatic Sonos indexing for the time being. Hopefully this will be sorted in the near future.

Darren
Enthusiast I
January 10, 2010
Hi,

Late last night I posted version 2.60.1 which is the first version to have a setup wizard. I discovered a bug this morning where the configurations files were being saved to the last used directory rather than the application directory. This has been fixed in version 2.60.2 which I have just posted.

On my Windows 7 PC I have a minor issue when it is installed to C:\Program Files\Darren Link\iTunes Library Manager. After installing, the application does not have the necessary permissions to write the configuration files to this directory. If I install the application to C:\iTunes Library Manager everything works as expected.

When the application is uninstalled via the control panel the configurations files are left installed. This should aid upgrading to a later version of the application without losing your configuration files.

If I change the permissions of directory C:\Program Files\Darren Link\iTunes Library Manager so that "Users (Darren-PC\Users)" has full control, the application is able to create and update the configuration files.

Hopefully I will have a fix for this installation issue in the near future. I have tested the installer on Windows XP and the above permission problem does not occur under this operating system.

Darren
Enthusiast I
January 10, 2010
Hi,

I have just been reading some information on the Apple forums about the filename of the iTunes XML file that is generated by iTunes.

Apparently if your iTunes library files are in the default location, iTunes will create an xml file called "iTunes Music Library.xml"

If however you have changed the location of your iTunes library files iTunes will create an xml file called "iTunes Library.xml"

In some circumstances you may find both files in your iTunes library directory but only one of these will be updated when you close iTunes. If you take a look at the modified dates of both files you can safely delete the old file. (If you have 2 copies of the XML file indexed by Sonos you will end up with duplicate playlist being imported for playlists that exist in both files)

The Sonos indexer will index the iTunes XML file regardless of whether it is called "iTunes Music Library.xml" or "iTunes Library.xml". The filename for the destination library path in my application can be either filename when the file is output to your NAS. The file on your NAS can be placed in the root of your share or in any subdirectory.

As I have my MP3 library on multiple PC's and laptops I have the following iTunes XML files on my NAS (generated by my app) and Sonos indexes the plalylists in each of them. The librarys on each PC and laptop have different playlists defined.

\\nas\sonos\iTunes\Darren\iTunes Library.xml
\\nas\sonos\iTunes\Darren Work Laptop\iTunes Library.xml
\\nas\sonos\iTunes\Charlotte\iTunes Library.xml

Renaming any of the "iTunes Library.xml" files to "iTunes Music Library.xml" does not affect the Sonos indexing as both are valid iTunes filenames.

I hope this clears up any confusion about the filenames. It had me confused for a while. I couldn't understand why I was getting different filenames on different systems when I had exactly the same version of iTunes installed.

Darren
Contributor III
January 12, 2010
Darren
For some reason my transformation rules have stopped working. I added some new tracks to iTunes and assumed the app would index them since it looks for closure of iTunes.
This did not happen so I did it manually and still it did not find them (and they are in the correct place).
So I thought something had become corrupted so I deleted the destination iTunes Library file and also the two cached csv's and started from scratch and it found no files at all. I have rebooted and tried again and still not found anything.
I am not entirely sure which version I am running since there is no About menu, but its dated 7 Jan 22.48. I think this is the version after the one I used previously which worked!
Gordon
Enthusiast I
January 13, 2010
Gordon,

I have been unable to replicate your issue on my system. Please can you try the latest version of the application (2.60.3) and let me know if the problem still exists?

The latest version 2.60.3 now installs on a per user basis, and installs fine under Windows 7.

Many thanks

Darren
Enthusiast I
January 27, 2010
Hi,

Tonight I have posted version 2.60.9 on my website at http://www.darrenlink.talktalk.net/ituneslibrarymanager/download

Since my previous post I have succesfully helped Gordon (gsa999) with his issues and have fixed several bugs reported by Gordon. :)

This thread has now had over 4000 views but I'm not sure just how many people are using my application or have tried using it. I wish I had a download counter on my website!!! Please post feedback whether good or bad. I'm also happy to answer any questions under this thread or via email.

The application now has an about menu so I can track any reported issues by version number. If you find a bug please let me know the details and the version number and I will do my best to fix the problem.

Unfortunately I still have not fixed the issues with kicking off the Sonos indexer, so in the meantime please continue to Kick off the Sonos indexer manually via a Sonos controller and do not enable the Sonos indexer under the application settings.

Darren
Contributor III
January 31, 2010
Hi Darren
Just found another problem. When the application launches itself after you quit iTunes to give you the opportunity to rerun the transformation process, it seems to remove itself from memory
So if you choose to run the process (or not run the process) and close iTunes Library Manager it dissapears from the system tray. So next time I go into iTunes and do something and then close it it does not seem to pop up again. I have to relaunch it from my startup folder and then open it manually.

I think this also happens if I launch it manually from the system tray (ie not the auto iTunes closure launch). So basically it seems it can only be run once when its in the system tray and then it disappears.
G
Enthusiast I
February 1, 2010
Gordon,

In version 2.60.9 I changed some code relating to the way the application exits with the minimize to system tray functionality enabled. I noticed that in earlier versions if you chose File -> Exit the application process was still running. This is fixed in version 2.60.9 but there are still some 'system tray' related issues. Thanks for you continued help and reporting issues.

I have tried replicating the issue on my work laptop under Windows XP but everything (generally) appears to be working as expected with version 2.60.9. I opened and closed iTunes several times and my application kicked in each time without the application disappearing from the Processes list (under Task Manager).
Please can you confirm if you are using version 2.60.9 and if not, what version you are using?

Ocassionally I find that the system tray icon stops responding to mouse clicks and that I am unable to restore the main window without killing the "iTunes Library Manager.exe" and restarting. Hopefully I will locate the source of these problems very soon. I am interested in your observation about the application removing itself from memory. Do you mean that the application disappears from the system tray or do you mean it disappears from the task manager?

If any new users wish to try my application I recommend giving it a go without using the minimize to system tray functionality until I have fully rectified the system tray issues.

I will endeavour to not post a new version of the application until I have ironed out all of the system tray issues.

Thanks

Darren
Contributor III
February 1, 2010
Hi Darren
I am using the latest version 2.60.9.
I have just tested it again. I click on the icon in the system tray and open the program up. I then close it - I did nothing in the app and the icon disappears from the system tray. It has also disappeared from task manager!
I am using Windows 7

G