Skip to main content
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.
Hi Darren

I use the iTunes Library Manager virtually every day. Its brilliant.

Would be nice to exclude Videos that exist in the Itunes library though as these always come up as exceptions
Many thanks Rephlex and gsa999 for your positive feedback. I'm sure you have both left positive feedback previously? It's nice to give something back to the Sonos community and to know that it's still being used.



gsa999:

I am aware that videos arent handled by my application but as they are automatically ignored by Sonos anyway I didn't bother to fix it. I agree that it would be nice for the videos to be skipped and not processed at all. If you have a lot of videos it must be annoying to see all of them in the non transformed tracks list. I don't have any videos in my library so it's an issue I always forget about.



BarryM:

Thanks for your keyboard shortcut idea. It's an avenue I had not even considered. It's possible to programatically send keyboard shortcuts to an application but the Sonos desktop controller would need to be opened and made the active window in order to work. I think I should be able to kick off the Sonos indexer without the need for the desktop controller to be open.



Cheers



Darren
I think I should be able to kick off the Sonos indexer without the need for the desktop controller to be open.



Yes, the dtc manages to kick off a re-index, so it should be possible for you to do it also.



It isn't covered in Sonos' only published api.



Mark Henkelis may have some insight. You could ping his thread at:

http://forums.sonos.com/showthread.php?t=14242





It's possible to programatically send keyboard shortcuts to an application but the Sonos desktop controller would need to be opened and made the active window in order to work.



Since the new 3.7 controller is rather slow to load I have added it into the registry so that it is an autostarted task.
Hi everyone,



I have been having lots of fun with iTunes match over the last week or so. The service matched 11000 tracks out of my 12000 and I am now using the service to replace my iPod 128/192kbps MP3's with the iTunes store equivalents (256kbps AAC[.m4a files]). This can be done without any additional charges on top of the years subscription (£22). I've already downloaded a very high percentage of my matched tracks and have been storing these in a new share on my nas called music_icloud. For tracks that I have not purchased on CD (i.e. online purchases), I will be copying these to my Sonos share (in the same folder structure) and replacing the MP3's. I have kept my original iPod share unchanged so if I find any bad or poorly matched AAC files I can revert just those specific songs to the original MP3's. Any tracks that I have purchased on CD will remain on my Sonos share in Apple Lossless format (cd rips), without being replaced by the iTunes store files.



My workflow may change a great deal now that I am using iTunes match and iCloud. I am hoping new Cd's can simply be imported as Apple Lossless and then matched to the iTunes store. Once matched I believe I'll be able to move the Apple Lossless files to my Sonos share and then simply download the iTunes store 256kbps AAC files. I am adding tracks to my iPad 3 and my wife's new iPod touch via the cloud. No more syncing via iTunes and the cable. It's slow for bulk loading but its a lot nicer for picking out tracks. It's very convenient being able to play/download any tracks from the iTunes match library wherever you have a wifi connection. If you simply play an album directly from the "iTunes match cloud" the tracks are played and downloaded simultaneously. With a good wifi connection this works without the listener realising the tracks are coming from the cloud, and once played once they are on the device, for offline listening.



I may need to provide an update to my application to support matched tracks in iTunes. Matched tracks show up as "Matched AAC" files in the kind column in iTunes. If this format is stored as the kind in the iTunes XML file I will need to add this format as a recognised source file format in my application.



Once I have got my new workflow process in order I plan to produce a PDF guide (from a word doc) showing how to set up Sonos in conjunction with iTunes, iTunes match and my application. I plan to describe every single step from initial setup to ripping and matching etc. Hopefully I can post this guide in conjunction with an update to my app. I have a holiday coming up very soon so this work may have to wait until I return.



So far I'd highly recommend using iTunes match. After my first years subscription I may cancel as I will have upgraded my entire library to the iTunes store files by that point and would only need the service for getting access to tracks in my "cloud library" when away from home. A big advantage of staying subscribed is that it provides another backup of all of my music (at least in iTunes store quality). Technically I would only really need to backup my Apple Lossless files, but for completeness I would backup the iTunes store files, to avoid re-downloading them using my slow/capped broadband connection.



I hope this is an interesting update for any existing or potential new users of my application



Cheers



Darren
DarrenLink,



I'm not an iTunes or cloud user.



If one later terminates the cloud service, does one retain rights to the updated tracks?
Buzz,



Here's a quote:

The matched tracks don't disappear if you turn off or unsubscribe from Match, as they're just plain m4a files.



From the following page:

http://forums.macrumors.com/showthread.php?t=1246300



Basically you can upgrade the quality of existing tracks by only paying for a single years subscription. This is going to be very useful for my wife's dad who has many scratched CD's that have ripped with poor quality as a result of lots of scratches.



Darren
Yes, the dtc manages to kick off a re-index, so it should be possible for you to do it also.



On the ContentDirectory UPnP service call RefreshShareIndex.
Controlav



Last night I improved the integration of the Sonos indexer code into my app. I am calling RefreshShareIndex.



It works reliably but only once without stopping and starting the application. It basically discovers the Zones, kicks of the indexer and then disconnects from the Zones. Re-running the same code without restarting the app and the Zones are not discovered. My app is designed to stay running all the time but I dont want it to be permanently connected to Sonos all the time it is running. I just want it to connect and disconnect as and when required. I hope I can resolve this issue so I can include the indexer in my next release.



Thanks



Darren
Hi everybody,

Hi Daren,



Thanks for your software, it seems to be well created ! It works allmost perfect for me. When I Actualise my sonos library, I get all my playlists...empty !



For information, if I just copy paste the Itunes Library.xml, I get my playlists with mp3, but none is working (Wrong adress)--> Normal



So does anybody have the same problem?



Thx



elinono
Hello,



I'm using iTLM to import playlists from iTunes to Sonos. Unfortunately, iTLM no longer finds the new playlists that I have created in iTunes.



I've verified that iTLM is source library config is correct. What else can I try short of uninstall and reinstall?



Thanks,

Scott
ucdscott,



Import will fail if there are more than a combined 40000 tracks in your playlists.
ucdscott,



Import will fail if there are more than a combined 40000 tracks in your playlists.




Import from iTunes into iTLM or iTLM to Sonos?



If the former, why?



How do I determine the total number of tracks contained in all my playlists?



Thanks,

S
ucdscott,



I'm not an iTunes or iTLM user.



SONOS will import iTunes playlists directly from the XML file -- as long as the track total is within the 40000 track limit. Here are some additional details.



If the iTLM output is a generic playlist, the rules are different because these become "Imported Playlists". While there is no theoretical limit to the number of tracks in an Imported Playlist, at about 65000 tracks a playlist will become difficult to use, however, you can define multiple Imported Playlists, each approaching 65000 tracks.



An imported playlist is mostly a simple text file and counts as one library track. In theory, one could have a single music track and 64999 Imported Playlists. While playlists are imported during a SONOS library update, Imported Playlists are read live. This means that the content of a playlist could change and that change will be visible the next time that the playlist is opened, regardless of any index updates. (Note that the display of that playlist will not be updated as you watch) This is not true for iTunes playlists. iTunes playlists are imported by the indexer and stored in the SONOS players. Only the location of each Imported Playlist is stored in the players, the contents are fetched from the library as needed.
ucdscott,



I'm not an iTunes or iTLM user.



SONOS will import iTunes playlists directly from the XML file -- as long as the track total is within the 40000 track limit. Here are some additional details.



If the iTLM output is a generic playlist, the rules are different because these become "Imported Playlists". While there is no theoretical limit to the number of tracks in an Imported Playlist, at about 65000 tracks a playlist will become difficult to use, however, you can define multiple Imported Playlists, each approaching 65000 tracks.



An imported playlist is mostly a simple text file and counts as one library track. In theory, one could have a single music track and 64999 Imported Playlists. While playlists are imported during a SONOS library update, Imported Playlists are read live. This means that the content of a playlist could change and that change will be visible the next time that the playlist is opened, regardless of any index updates. (Note that the display of that playlist will not be updated as you watch) This is not true for iTunes playlists. iTunes playlists are imported by the indexer and stored in the SONOS players. Only the location of each Imported Playlist is stored in the players, the contents are fetched from the library as needed.




My issue is is with iTLM not seeing the new playlists I've created in iTunes. Thus, your guidance (while useful information) does not apply.



S
Ucdscott,



It sounds like you may have hit the 40000 limit mentioned by buzz. I hit this issue and its one of the main reasons I wrote my app. I wanted an ability to choose which itunes playlists to import into Sonos, so I created the playlist selector. This feature means that the playlists that you haven't selected are removed from the output XML file that the program generates.



Please try selecting just your new playlists to see if this works. Before doing this, if you use the analyse destination library function it will tell you the count of playlists and the number of contained tracks for each of the following categories:



Standard Playlists

Smart Playlists

All Playlists



If the tracks count for "All Playlists" is greater than 40,000 Sonos will not be able to import them all.



Darren
Gents,



I must not be explaining myself clearly. As stated previously,



"iTLM no longer finds the new playlists that I have created in iTunes"



Thus, my issues has NOTHING to do with Sonos. In this scenario, please pretend Sonos doesn't exist. My issue is between iTunes and iTLM - specially, iTLM does not see the new playlists I have created in iTunes. Therefore, I cannot select them.



I've analyzed the destination library as requested. A screenshot of the results as well as comparative screenshots of the playlists iTunes sees vs the playlists iTLM sees are posted here:



http://2101sander.dyndns.org/



Thanks,

Scott





Ucdscott,



It sounds like you may have hit the 40000 limit mentioned by buzz. I hit this issue and its one of the main reasons I wrote my app. I wanted an ability to choose which itunes playlists to import into Sonos, so I created the playlist selector. This feature means that the playlists that you haven't selected are removed from the output XML file that the program generates.



Please try selecting just your new playlists to see if this works. Before doing this, if you use the analyse destination library function it will tell you the count of playlists and the number of contained tracks for each of the following categories:



Standard Playlists

Smart Playlists

All Playlists



If the tracks count for "All Playlists" is greater than 40,000 Sonos will not be able to import them all.



Darren

Hi Darren

I know we've not had an update to iTunes Library manager for some time. Is it still in development?



If so I have a request. Is it possible to add a select all button to the playlist chooser. I have a lot of playlists and want to sink most of them but not all. At the moment you have to mark each one manually. If there was a select all I could hit that and then manually remove the few I dont want to sync



Also ignoring the videos/films in thel library would be good as well



Great app - still works brilliantly

G
Gents,



I must not be explaining myself clearly. As stated previously,



"iTLM no longer finds the new playlists that I have created in iTunes"



Thus, my issues has NOTHING to do with Sonos. In this scenario, please pretend Sonos doesn't exist. My issue is between iTunes and iTLM - specially, iTLM does not see the new playlists I have created in iTunes. Therefore, I cannot select them.



I've analyzed the destination library as requested. A screenshot of the results as well as comparative screenshots of the playlists iTunes sees vs the playlists iTLM sees are posted here:



http://2101sander.dyndns.org/



Thanks,

Scott




Uninstall, delete all ITLM folders, and re-install of ITLM solved the issue.



Would have preferred to hunt down the specific issue so a bug fix could be implemented. Who knows how often and to how many users this is occurring.



S
Hi Darren

I know we've not had an update to iTunes Library manager for some time. Is it still in development?



If so I have a request. Is it possible to add a select all button to the playlist chooser. I have a lot of playlists and want to sink most of them but not all. At the moment you have to mark each one manually. If there was a select all I could hit that and then manually remove the few I dont want to sync



Also ignoring the videos/films in thel library would be good as well



Great app - still works brilliantly

G




I second this request and would like to propose the code be made an open source project like those at SourceForge.



Updates and bug fixes aren't release frequently enough and the author doesn't charge for the program, so what's the point of keeping it closed source?



S
Darren,



I've searched everywhere but cannot find any reference to invoking ITLM via the command line. Is this possible?



Seems like this would be not only straight forward to implement but also a much desired capability - use the GUI to configure ITLM and then schedule a simple batch file to execute "iTunes Library Manager.exe" -process



Thanks,

Scott
gsa999 and ucdscott,



I have done some development tonight and have made some improvements to the playlist selector.



1) I have added a button for selecting/unselecting all playlists



2) If you right click a playlist folder with sub playlists a pop up menu appears giving you the ability to either a) select that playlist and all sub playlists b) unselect that playlist and all sub playlists.



3) On the view showing just the selected playlists my implementation for pressing the delete key in order to delete playlists was poor. It refreshed the entire list upon deletion. Now just the selected playlists are deleted (unselected from the tree) and an appropriate remaining node is selected. This allows you to keep pressing the delete key to delete one playlist at a time. You can also select multiple playlists and delete them all in one go. When I say delete, I mean they are removed from this view and unchecked in the tree view and all playlists list view.



I hope to do a few more updates over Christmas before making these changes available to download. I have been making changes to make the application work better with iTunes Match libraries as I am using iTunes Match myself. I need to remind myself how I was generating the installer for the app. It has been so long since I last did it!!!



Regarding ucdscott's issue with playlists not showing, I have never experienced this issue myself. If the issue arises again it would be beneficial if you could somehow give me access to the application config files and also your iTunes Library.xml file. I will then be able to diagnose the issue and provide a fix.



I apologise for not providing updates for a long time. Since commuting to work in London everyday (7am to 7pm) I don't have as much free time and energy as I used to!!! A lot of my free time lately has been spent trying to sort out my iTunes Match library after merging in all of my wife's unorganised music.



I find that my app is particularly useful now that my parents have Sonos. We are sharing the same iTunes Match library and my app allows myself and my parents to have different playlists from the same library imported into Sonos. I can pick and choose any playlists that my parents create and vice-versa.



Darren
gsa999 and ucdscott,



I have done some development tonight and have made some improvements to the playlist selector.



1) I have added a button for selecting/unselecting all playlists



2) If you right click a playlist folder with sub playlists a pop up menu appears giving you the ability to either a) select that playlist and all sub playlists b) unselect that playlist and all sub playlists.



3) On the view showing just the selected playlists my implementation for pressing the delete key in order to delete playlists was poor. It refreshed the entire list upon deletion. Now just the selected playlists are deleted (unselected from the tree) and an appropriate remaining node is selected. This allows you to keep pressing the delete key to delete one playlist at a time. You can also select multiple playlists and delete them all in one go. When I say delete, I mean they are removed from this view and unchecked in the tree view and all playlists list view.



I hope to do a few more updates over Christmas before making these changes available to download. I have been making changes to make the application work better with iTunes Match libraries as I am using iTunes Match myself. I need to remind myself how I was generating the installer for the app. It has been so long since I last did it!!!



Regarding ucdscott's issue with playlists not showing, I have never experienced this issue myself. If the issue arises again it would be beneficial if you could somehow give me access to the application config files and also your iTunes Library.xml file. I will then be able to diagnose the issue and provide a fix.



I apologise for not providing updates for a long time. Since commuting to work in London everyday (7am to 7pm) I don't have as much free time and energy as I used to!!! A lot of my free time lately has been spent trying to sort out my iTunes Match library after merging in all of my wife's unorganised music.



I find that my app is particularly useful now that my parents have Sonos. We are sharing the same iTunes Match library and my app allows myself and my parents to have different playlists from the same library imported into Sonos. I can pick and choose any playlists that my parents create and vice-versa.



Darren




Thanks for the update. I will test it and post any issues I discover.



Also, if I encounter the "missing playlists" issues again, I will post any file you require to my web server.



Would be great if you can find time over your break to implement command line execution of the process feature that I requested in my previous post. Please let me know if you have any questions.



S
ucdscott,



Regarding the command line feature that you have requested, I am curious about how you would use this. Are you aware that the iTunes Library.xml file is only updated when iTunes is closed and that there is a feature within my app to auto detect the closure of iTunes. If configured to do so, when iTunes is closed the application auto pops up from the system tray if any of the configured library files have been modified. The app then gives you the option to process the library XML file. I don't see any point in scheduling a daily auto-process via the command line as there will be no change in the source iTunes Library.xml file if iTunes has not been opened between two consecutive scheduled runs. I just feel the most appropriate time to process the XML file is upon closure of iTunes and my app already provides a feature to kick in at this time. If you can convince me of the benefits of a command line feature I will consider implementing it over Christmas.



Out of interest would you expect to see the GUI when running the app from the command line? The GUI would be needed if the user chooses to 'select playlists' upon processing.



Out of interest are you using my app to simply choose which playlists are transferred to Sonos or are you also using it to map lossey files to their lossless equivalents? Since upgrading to iTunes Match I have personally stopped using this feature. This is because Matched AAC files have the same extension (m4a) as Apple Lossless files. I now have an iCloud share (I:\ drive) that stores all my iTunes Match AAC files and a Sonos share (S:\) that stores my Apple Lossless files + copies of the iCloud tracks that I do not have Apple Lossless equivalents of. I am now letting iTunes organise my files on my I:\ drive and my S:\ drive has the identical structure, with iCloud tracks essentially replaced with Apple Lossless equivalents. All of the file names on my I:\ and S:\ drives are now identical so path transformations are no longer necessary. Remember AAC files and Apple Lossless files have the same extension (.m4a).



As the Sonos indexer assumes all of the files referenced within the XML are located on the same share as the XML file itself, no path transformations are required. With my old setup I had to ensure paths ending with .mp3 were transformed to paths ending in .m4a whenever a lossless equivalent was found. This is no longer necessary.



Even if I wasn't using iTunes Match I would have a lossey share contains AAC 256kbps tracks and my Sonos share containing the same tracks with Lossless equivalents wherever possible.



Apologies for rambling on....



Darren
Hi Darren,



Answers in-line below. Thanks, S



ucdscott,



Regarding the command line feature that you have requested, I am curious about how you would use this. Are you aware that the iTunes Library.xml file is only updated when iTunes is closed and that there is a feature within my app to auto detect the closure of iTunes. If configured to do so, when iTunes is closed the application auto pops up from the system tray if any of the configured library files have been modified. The app then gives you the option to process the library XML file.





I am aware of this capability.







I don't see any point in scheduling a daily auto-process via the command line as there will be no change in the source iTunes Library.xml file if iTunes has not been opened between two consecutive scheduled runs. I just feel the most appropriate time to process the XML file is upon closure of iTunes and my app already provides a feature to kick in at this time. If you can convince me of the benefits of a command line feature I will consider implementing it over Christmas.





The benefits of being able to silently execute ITLM's process function at a specified time each day (e.g. five minutes before my scheduled Sonos library update) are twofold:



1. No need to have ITLM running constantly in the systray taking up space and using resources



2. No need to interact with the ITLM GUI (unless new playlists need to be selected or existing one removed)







Out of interest would you expect to see the GUI when running the app from the command line? The GUI would be needed if the user chooses to 'select playlists' upon processing.





No, as stated above in #2, I have no interest in seeing the GUI, nor should anyone else, if all I need to do is "Process."





Out of interest are you using my app to simply choose which playlists are transferred to Sonos or are you also using it to map lossey files to their lossless equivalents?





Only to choose playlists.


snip... Are you aware that the iTunes Library.xml file is only updated when iTunes is closed...




Darren,



As of a test I ran in May/June of 2012, I was able to re-index my Sonos Share from a iTunes-based NAS while leaving Laptop-based iTunes open and running.



I initially discussed this issue here (see Posts #s 8 & 9) : http://forums.sonos.com/showthread.php?t=28170



Also see Post #9 here: http://forums.sonos.com/showthread.php?t=30005



I saw the NAS-located .XML file updating and closing. After an iTunes music file change, I re-indexed Sonos and the new information was available without closing iTunes on the Win7 64bit Laptop PC I use.



This was using iTunes 10.6x at the time. All things can and do change with newer iTunes versions. PC vs. Mac and NAS vs. local drive could change the outcome as well.



It certainly appears that iTunes will update the .XML file on the fly, and release it for 'other' programs' use. At least it worked for my setup...



I have not tested this function since. My main PC remains on v10.6 and may move to 10.7 soon. I'm still evaluating 11.x...



Best of Luck