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

Rephlex
Avid Contributor I
February 1, 2010
I'm also now using 2.60.9 with Win7.

I'm using it purely to copy the library with iTunes playlists onto the NAS. I started using it in early January 2010 and have installed each upgrade. It's working perfectly for me and has solved my issue with imported playlists so I'm very happy.
Enthusiast I
February 1, 2010
I'm also now using 2.60.9 with Win7.

I'm using it purely to copy the library with iTunes playlists onto the NAS. I started using it in early January 2010 and have installed each upgrade. It's working perfectly for me and has solved my issue with imported playlists so I'm very happy.


Many thanks for feedback Rephlex. Presumably you have all your music files on your NAS with your library files on your local PC and you were manually copying the iTunes XML file over to your NAS before you started using my app? This is exactly what I was doing before I created lossless copies of most tracks on my NAS and before I started writing the app. I found that the indexer does some educated guess work if the tracks within iTunes are referenced by drive letter or mapped network drive letter. If you have your music in C:\Music on your local PC and the same structure mirrored (perhaps using robocopy) to your NAS at \\nas\Music for example you can simply copy the local copy of your iTunes XML to your NAS and the indexer automatically interprets the C drive letter as being the root of the NAS instead. Having your music locally as well as mirrored to your NAS gives you 5 major advantages: 1) You can listen to music when you are away from home (if you have a laptop) 2) The performance when synching an iPod will be better if the files are stored locally rather than being fetched across the network from your NAS to your ipod + you can synch/add tracks on the go 3) You have a backup of all of your music (music stored on your PC as well as your NAS). 4) When using my app to do the 'copy' you can chosse the playlists you want to transfer to Sonos 5) Tagging will be a lot quicker when tagging files stored locally, especially when adding album artwork. I think this setup is likely to benefit more people than the lossey to lossless path transformation feature. I recommend having your local tracks as your master copy with the NAS as a robocopy mirror for Sonos useage.

Gordon,

I think I have worked out what you are seeing. When the application is minimized to the system tray the application disappears from the Applications tab of the task manager but remains running and can be found as "iTunes Library Manager.exe" under the processes tab. (Order the processes by image name if you have trouble finding it)

In Windows 7 I find that when the application is minimized to the system tray it is often hidden "behind" the up arrow. The screenshots at the following url show this on my PC:

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

In order to get the application back when it is minimized to the system tray and hidden I have to click on the up arrow and then click on the little house icon. I have found that if the application is not minimized but hidden behind other windows, clicking on the system tray icon does not bring it to the front. I think it would be a helpful feature to ensure it always comes to the front.

On some occasions I find that when it is minimized and the application window is not visible, clicking on the house icon does not make the application visible, and no matter what I do I cannot get it back without killing the process within task manager (Processes tab) and restarting the application. This is the bug I really need to fix.

If you use the mizimize all window / show desktop feature, clicking on the system tray icon does not show the application. I find I can get it back by doing Alt -> Tab to cycle through the open windows.

I hope that helps. Please let me know if I have misinterpreted the issue you have been experiencing.

I'm hoping I can greatly improve the user experience just by doing a few very minor tweaks.

Thanks

Darren
Contributor III
February 3, 2010
Hi Darren
Yes I knew about the up arrow feature of the system tray, but I found that it kept disappearing from there as well. I have now changed the icon to always show on the system tray rather than only show notifications (which is when you have to click the up arrow). I ran the program and exited and it disappeared from the system tray.

I am finding it disappears from the Task Manager application and the running processes tab though!
Prodigy I
February 3, 2010
Darren, Your application sounds like the missing link I need! And it is a shame that you have had so little feedback from users.

As a recent convert to Sonos, I have to say I was disappointed by the total absence of library management features and was surprised that I would need to rely on another program like iTunes for user-friendly creation ofplaylists. (I suppose I didn't read enough of the technical blurb beforehand!) Having found that out, my next sharp intake of breath was when I realised the complications of managing lossless and lossy libraries simultaneously, for Sonos and iPod use. Looks like your Library Manager should sort this out for me.

One question: my lossless files are currently FLACs, and I was intending to convert them to Apple Lossless so that they could be managed by iTunes (to create playlists etc). If I use your app, is this actually necessary? Any disadvantages to having FLAC and mp3 instead of ALAC and mp3 (for Sonos and iPod respectively)?
Enthusiast I
February 3, 2010
Hi Darren
Yes I knew about the up arrow feature of the system tray, but I found that it kept disappearing from there as well. I have now changed the icon to always show on the system tray rather than only show notifications (which is when you have to click the up arrow). I ran the program and exited and it disappeared from the system tray.

I am finding it disappears from the Task Manager application and the running processes tab though!


Gordon,

If you use the File->Exit menu the application will completely end. If the application is ending as soon as you click on the close icon I suspect you do not have "Minimize to system tray on close" ticked under Edit->Settings. I recommend having all of the following ticked:

Minimize to system tray
Minimize to system tray on startup
Minimize to system tray on close

If you do not have the third option ticked it will only minimize to the system tray when you click on the minimize icon. If you click on the close icon the application will exit. With the third option ticked the close icon has the same affect as minimize.

I hope the above solves your issue but if it doesn't let me know and I will continue to help.

Regards

Darren
Enthusiast I
February 4, 2010
Darren, Your application sounds like the missing link I need! And it is a shame that you have had so little feedback from users.

As a recent convert to Sonos, I have to say I was disappointed by the total absence of library management features and was surprised that I would need to rely on another program like iTunes for user-friendly creation ofplaylists. (I suppose I didn't read enough of the technical blurb beforehand!) Having found that out, my next sharp intake of breath was when I realised the complications of managing lossless and lossy libraries simultaneously, for Sonos and iPod use. Looks like your Library Manager should sort this out for me.

One question: my lossless files are currently FLACs, and I was intending to convert them to Apple Lossless so that they could be managed by iTunes (to create playlists etc). If I use your app, is this actually necessary? Any disadvantages to having FLAC and mp3 instead of ALAC and mp3 (for Sonos and iPod respectively)?


Hi withannee67,

Thanks for your comments. If you already have an iTunes library consisting of mp3's the iTunes xml file can be modified by my application to point at your FLAC files. FLAC files cannot be added to your iTunes library but the modified xml can quite happily point at your FLAC files and Sonos will correctly import it and all of your playlists. One advantage of using Apple Lossless files instead of FLAC is that the modified XML file pointing to the Apple Lossless files can actually be imported into a second blank iTunes library to create a normal iTunes library that you can browse in iTunes. I don't actually do this (as it takes time to import into iTunes) but if you ever want to generate a fully browsable Lossless library from your Lossey library my application will allow you to do this. All your playlists within your lossey library will then be in your second Lossless library. The other advantage of using Apple Lossless is that you can do all of your ripping within iTunes to create both the Lossey and Lossless copies of each track. I find the easiest way of ripping is to simply import using Apple Lossless into my MP3 library, do all of my tagging and attaching of cover art and then to convert those tracks to MP3 using iTunes. The MP3's that are generated from the Apple Lossless tracks are then guaranteed to have the identical tagging and cover art as the original files. Once you have both versions of each track in your library you can then delete the Apple Lossless tracks without physically deleting the files. The Apple Lossless files can then be moved to your NAS for indexing.

The lack of feedback about my application, may be because it cannot be simply downloaded and used out of the box. Users need to understand how it works and structure their music files in a way that allows the application to function as intended. This is not something that is particularly easy to do in some circumstances. A lot of potential users are probably very wary of changing the setup they are familiar with. Also when I started this thread the main purpose of the application was to do the redirecting from lossey to lossless tracks and this was the main advertised feature. This however is now advanced and optional functionality and a simpler setup can be used to simply choose which playlists are imported into Sonos. For users who only have each track in one format they can simply use the playlist selection functionality.

If you have enough patience and are serious about using my application for a multi bitrate setup I can guide you through the setup. Firstly if you already have all of your tracks in FLAC and MP3 format I personally would stick with the FLAC's and not worry about converting them to Apple Lossless. If you are happy with the way you generate both your FLAC and MP3 copies then stick with the method that you are happy with.

Before I can help you any further I will need to understand how you currently have your FLAC and MP3 files stored and the state of your iTunes library. Do you have your FLAC files on a NAS and your MP3's stored on your local PC? This is my recommended approach. I also recommend having your iTunes library files stored on your local PC pointing to your local MP3's. (This is good for ipod synching and portability of your music if you have a laptop) It may not be easy for you to get to this starting point so be cautious and ask as many questions as necessary before doing anything. I also recommend backing up your current setup if you haven't already done so. My application can take the locally stored XML file pointing to the locally stored MP3's, redirect all of the track paths to the FLAC's on your NAS and then save the modified XML file onto your NAS for indexing.

Many apologies for such a long reply. It's a complicated subject that requires a lot of explanation and patience. My application is far from being easy to support because there are so many different starting setups!!! If I haven't put you off, describe your current setup in detail and we can take it from there.

I hope that all made sense, but any questions just ask.

Regards

Darren
Prodigy I
February 4, 2010
Hi Darren,

Many thanks for the thoughtful and helpful reply. I appreciate your advice, but don't want to take too much of your time - so please don't feel that you need to guide me all the way through the setup process in detail.

But your initial guidance is helpful, as I want to avoid eg. wasting my time making unnecessary file conversions. So here is my current setup:

Lossless: I ripped my all CD's to FLAC with dbPoweramp, and saved them on my NAS, current path is:
\\NAS\Media\Music\FLACs\[Artist]\[AlbumTitle]. This is my master library.

Lossy: this is a bit of a mess currently. I haven't yet converted any of the FLACs to lossy format. So, what I have is a historical, partial collection of tracks ripped with iTunes into AAC (.m4a) format. These used to be on the PC, but I moved them to my NAS before buying Sonos. Their path is:
\\NAS\Media\Music\iTunes\iTunes Music\[Artist]\[Album Title].

Sonos is currently pointed to the \\NAS\Media folder, so it picks up the lot.

Before stumbling across your application, I was planning to do the following:
- convert all the FLACs to ALAC with dbPoweramp (I can't remember why I originally chose to rip into FLAC - I started ripping while I was deciding between Sonos and Logitech systems, and I think I had duff info thatone or other of them does not support Apple Lossless)

- convert the FLACs or ALACs to AAC with dbPoweramp for iTunes/iPod use. I planned to ditch the entire current iTunes library and start again - the lossy library is small and it would take longer to figure out which tracks I already have than to simply batch convert everything.

Based on what I have read about your app, I would now plan to:

- move FLACs to \\NAS\Sonos\Music\[Artist]\[Album]

- start again with a new library of lossy files on the PC in iTunes (not sure whether to go aac or mp3). File path to match the NAS ...\Music\ etc

Does this sound right?

Two last questions: I assume your application requires the whole path to be identical from \Music\ onwards in both libraries, including the \[Artist]\[Album]\[track] part. I know I can make these paths identical if I use dbPoweramp for converting to lossy. But if I use iTunes for conversion, won't it impose its own different filename convention and artist/album folder structure? Secondly, is it possible for iTunes to mess up the folder structure in the lossy library further down the line even if I made it identical to begin with (I recall some setting in itunes to have it manage the files)? If so, how do I prevent this?

Sorry, I will have already taken more of your time than I intended to! But if you can point in the right direction, I'll give it a whirl and won't blame you if I muck it up!

Thanks,
Enthusiast I
February 4, 2010
Hi withanee67,

It sounds like you already have a good handle on how to set things up. Firstly it is important to remember to keep only the highest quality copy of each track within the Sonos share that you are indexing. If you have some tracks that you only have in a lossey format I recommend having one copy on your local PC and one copy within your NAS share. At the moment it sounds like you have both FLAC's and AAC files within the same Sonos share so moving your FLAC's to \\NAS\Sonos\Music and only indexing your \\NAS\Sonos share is a very good starting point. Providing you haven't got any duplicate FLAC files, your indexed library within Sonos shouldn't have any duplicates. Remember to remove your \\NAS\Media share from the shares that are indexed by Sonos.

Once you are happy with the way Sonos is indexing your FLAC files within \\NAS\Sonos I recommend mapping that share as an S network drive on your PC. (S for Sonos). You can do this by right clicking "My Computer" and selecting "Map network drive". Select S for your drive letter and specify \\NAS\Sonos as the folder path. You should then be able to view your FLAC files via S:\Music\[Artist]\[Album]

Now on to the trickier part, setting up your iTunes library on your local PC consisting of the lossey equivalents of each track. Firstly you should aim to keep the structures identical. This will be a lot easier if you are creating your lossey files from scratch one album at a time. Firstly I recommend setting up a brand new iTunes library on your local PC and then configure iTunes to not mange the locations of your tracks. Within iTunes under Edit->Preferences->Advanced tab ensure that "Keep iTunes Media Folder Organised" and "Copy files to iTunes Media folder when adding to library" are both unticked. With these options ticked iTunes will rename track paths if you update any of the tags. (This will lead to issues with my app as the track mapping data will become out of date and the folder paths may not match the structure on your NAS). Now choose where you wish to store the lossey tracks. If you have a data drive or partion such as a D drive I would recommend storing them in D:\Music and setting your iTunes media folder location to D:\Music. After wripping an album to D:\Music\[Artist]\[AlbumTitle] from a standard Windows file explorer window you should be able to change D:\ within the folder path to S:\ to get to the FLAC files for that album on your NAS. With this simple rule you will be able to keep the transformation rules nice and simple within my application, when you get to that point. You will be able to tell the app to find "D:\Music" within each path and replace it with "S:\Music" to get to the FLAC files.

I will now give you another tip that should make things easier. If your track filenames begin with the track number (or in the case of multi-cd albums the disc number and the track number) my application will be able to match up any tracks with slightly different file names easily. I'll give you an example:

If your path in iTunes was:
D:\Music\Beatles\Please Please Me\10 Baby It's You
and the equivalent path to the FLAC was:
S:\Music\Beatles\Please Please Me\10 Baby Its You.flac (note the missing quote)
my program will be able to match up the two tracks and give you the option to rename the FLAC file so that it's filename is identical to the lossy file (but without changing the flac extension). This works if you track filenames are numbered in the format "01", "02", "03" etc or "1-01", "1-02", "1-03" etc. Your flac files could simply be called "01.flac", "02.flac" and my program will suggest renaming them to match the same filenames as the lossey tracks in iTunes. This eliminates the headache of ensuring that your ripped tracks in both formats have the same filename. I hope you find this feature helpful. If you do not choose to include track numbers within filenames you will need to ensure that each version of a track has the same filename manually (excluding the extension).

If you use iTunes to rip your MP3's iTunes will name the tracks automatically. You will find tracks with extra long names are shortened or symbols replaced with underscores. You can manually alter the filenames to your desire and then tell iTunes to find the newly named file by double clicking on the track within iTunes. My program will give you the option to rename the flac equivalent to the same filename as in iTunes, regardless of whether you have stuck to the default iTunes filename or changed it to suit your preference.

I must say, you will be given the option to rename your flacs to the same filenames as your lossey files and that this is not a necessity for correct opertion of the application. I just like to be organised and to ensure all my track files have the same filename but with different extensions.

How you rip your FLAC files and the lossey equivalents is entirely up to you but just remember to keep the structures identical. It is helpful if you can rip in the lossless format, do all your tagging and attaching of cover art and then use the same application to convert those lossless files to you chosen lossey format. If you do this your lossey tracks should have identical cover art and tags as the lossless tracks. Try to get your tagging perfect before you generate the lossey file from the lossless file. Once you have two copies of each track it is very hard to update tags as you will need to make the same changes to both files. Unfortunately this is one of the headaches of maintaining two copies of each track. At least with my application you will not need to create the same playlists for your lossless files as for your lossey files. You can simply have one iTunes library pointing to your lossey tracks and you will be able to create playlists for both your iPod and Sonos all in one place. You can also easily create playlists on your iPod and transfer them to your Sonos system.

Hopefully that has answered all of your questions but if I've missed anything or you have any more, fire away.

I hope that all made sense and best of luck with the setup. Take it in stages and get your FLAC files sorted first. You could then create your brand new lossey iTunes library with a single album and then try my app. Create a single playlist within iTunes that includes you favourite tracks from your test album and use my app to transfer that playlist to your Sonos system. I can give you assistance on how to configure my app once you get to that stage.

Sorry for such a long post. I hope it helps yourself and other users getting started with my app.

Regards

Darren
Enthusiast I
February 5, 2010
withanee67,
Please see my previous post for a response to your questsions.

All,
Last night I had a thought. For those of us who like to have lossless on their Sonos system but lossey on their ipods wouldn't it be great if the industry could develop a special container file format (almost like a zip say) that could hold both the lossey and lossless data along with all the meta data and cover art. Perhaps this has been considered as part of the specification for the MusicDNA file format (http://www.ubergizmo.com/15/archives/2010/01/musicdna_music_file_format_unveiled.html) The biggest problem with having the lossey and lossless data in separate files (and locations) is that it makes tagging difficult. If you apply a tagging change to one of the files, you need to apply the same tagging change to the other file also to keep them in sync with each other.

The file format would need to be built in a way where systems like Sonos can easily and efficiently just play the Lossless data but applications like iTunes could efficiently just copy the lossey data and it's meta data over to the portable music player (with little or no performance hit). When listening within iTunes itself the application could simply play the lossless data.

I would love to have an all in one file format that is suitable for both home and portable use and at the same time makes the task of tagging a lot simpler. When ripping to this format, the ripping software would create both the lossless and lossey data in one ripping operation. Perhaps when downloading a MusicDNA file you would get just the lossey data by default but you could pay extra to download the lossless data into your MusicDNA file?

Maybe Sonos could push the industry or the makers of MusicDNA for something along these lines? (Perhaps this should go under the Sound Ideas section of the forum) but I'd like it to stay here also. Will iTunes and Sonos be supporting the MusicDNA format?

Any thoughts?

Regards

Darren
buzz
Grand Maestro
February 5, 2010
DarrenLink,

With respect to the new format, I disagree. I would rather have the portable device loaders down convert the files on the fly. Overall, I think that this is a better solution because a new format would imply that all of the rippers and taggers would need to be updated -- again. True, there are probably as many rippers and taggers as there are downloaders, but the optimum download format for the portable is a moving target.

If there are multiple portable units in a household, possibly spanning multiple generations, a single embedded low resolution format is not appropriate either. New devices are sporting more memory and at some point I suspect that lossless downloads will be practical. If the device loader transcodes on the fly, the optimum format can be used for each device. True, the transcoding will require more processor power, but modern computers are so fast that this is not much of an issue.

Another aspect of embedded data is that anything touching the file will have to slog through at least one irrelevant copy of the music data. This will tend to clog the network FOR EVERY TRACK. Even simple tag editing will slow down. I would rather do some special handling every once in a while. I don't mind launching a process that might run for days.