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.
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.





Buzz,



I believe when synching to an iPod shuffle you could down convert tracks to a smaller format. I remember doing this for my iPod shuffle at the time and it was painfully slow for just 100 tracks. It takes my PC about 20 minutes to convert a single album from Apple Lossless to MP3 so it would take weeks to synchronise 10,000 odd tracks with a brand new iPod. I really can't see an on the fly down conversion being practicle for filling a 160 Gb empty iPod Classic with MP3's down converted from Apple Lossless on the fly. My 60 Gb ipod takes about 3 hours to populate fully from empty without doing any conversion. Perhaps I need a new computer but I can't see a new PC being any where near faster enough for this to be practicle.

Extracting a single file from a zip file is a very quick process in comparison to doing a down conversion from one format to another, and that is doing decompression. Without compression it should be practicle I would have thought.



New rippers will be required for the Music DNA format so that issue will need to be tackled at some point. I have no idea if that will take off or when however and have no idea about its spec.



Potable devices will continue to grow in capaciy but so will the demand to populate them with every increasing library sizes. From the following calculation I suspect we will need a 1 terrabyte portable device to be able to populate it with approximately 50,000 Apple Lossless files.



20 Mb approx per track x 50,000 tracks = 1,000,000 Mb = 1 terrabyte approx



According to amazon you can get 40,000 MP3's on a 160 Gb iPod classic but the number of Apple Lossless files would be far less.



My 250 Gb NAS is completely full and the majority of my my 10,000 track library is in Apple Lossless. At the moment I wouldn't be able to get all of the my Apple Lossless files on to a 160 Gb iPod. Capacity may well grow at a larger rate than my collection so maybe at some point in the near future I will be able to populate a portable device with my entire library of Apple Lossless tracks. That is something to look forward to.



If you have lossey and lossless files in separate files in different locations you are always going to need to maintain a relationship between the two files, just like my application currently does. If you can think of a better way of doing this in my appliation please let me know. I'm always open to new suggestions. At the moment I can easily alter the tags in my iTunes MP3 library but I don't have an efficient way of ensuring those changes are also applied to the Apple Lossless tracks. I therefore try to get my tagging perfect just after ripping and before generating the lossey copy.



Hi Darren

Thanks for your latest guidance, particularly on how to ensure that ITunes doesn't reorganise my carefully constructed file structure!





Best of luck with trying my app Jeremy. Any questions you have about configuring my application, let me know and I'll get back to you as soon as I can.



Regards



Darren
I suspect you do not have "Minimize to system tray on close" ticked under Edit->Settings. Darren

You are absolutely right Darren, apologies. I have now turned this option on

Gordon
You are absolutely right Darren, apologies. I have now turned this option on

Gordon




Thanks for confirming Gordon. It's good to know the cause of the behaviour that you were seeing with the system tray functionality.



I recommend that other users try the system tray functionality once they have set up the application to work with their setup. When enabling the system tray I suggest all of the system tray options are ticked within Edit->Settings



Regards



Darren
Hi,



I have posted version 2.70.0 tonight which fixes a minor bug within the "Non exact match found" dialog box. Ampersand (&) characters within file paths were previously not displayed.



This is likely to be my last update for a while as I am currently seeking alternative employment.



Please feel free to continue posting questions and comments and I will get back to you as soon as I can.



Regards



Darren
... and thanks for your work on this so far. I am going to load it up later today, and don't foresee any problems.



All the best
Hi Darren,



Seems I spoke too soon in my last post!



I have just installed v2.70.0 and have two problems:

1. The mapping transforms aren't working for me; and

2. the Library Manager has crashed several times.



In more detail:

1. I am 99% sure I have set up the transformations correctly, but when I process the rules, none of the destination files are found. I say I am 99% sure I have set up the tranformation rules correctly because of a test I did: I went to the csv file of unmapped files and copied one of the track paths into Windows Explorer address bar; I then manually edited the start of the path in identical fashion to the rule I had set up (replacing c:\My Music with s:\Music, and changing the file extension from .m4a (AAC) to .flac . Explorer found the correct lossless file, showing that the transformed path and filename were correct.



Of course, I could be missing something obvious, but I wondered if this might be a problem with the new v2.70?



2. On a number of occasions, the Library Manager has crashed at the end of processing the mapping rules. The program then won't run again until after a reboot. I couldn't detect any pattern to the crashes - sometimes all was OK, sometimes not, about 50:50. I have a screen shot of the error report if that is helpful to you (not sure how to send this to you though).



Sorry to bother you with this when no doubt you have more important things to do, but if you get bored of the job search and have a moment to reply with any suggestions, I'd be very grateful.



Thanks, Jeremy
Hi Jeremy,



Sorry to hear that you are having trouble. I have confirmed tonight that I haven't broken anything in my 2.70 release by deleting the mapping cache file and the non mapped tracks file from my PC. I then processed my configuration and the mapping cache file was completely rebuilt. If you make any substantial changes to your mapping rules I recommend deleting both the mapping cache file and the non mapped tracks file before reprocessing.



Please can you confirm that you have a single mapping rule defined with the following configuration:



Source Media Type: AAC Audio File (m4a)

Source Path Find: C:\My Music (check case)

Path Replace: S:\Music (check case)

Destination Media Type: FLAC - Free Lossless Audio Codec (flac)



I have just done a test on my PC and I suspect I know the cause of your issues with the mapping rules. If the drive letters are specified in lower case instead of upper case the rules fail. The find and replace operation on the paths is currently case sensitive. If the path of a track in iTunes begins with C:\My Music the find rule of c:\My Music will unfortunately fail. This is something I should probably address in a future release.



If this is the case with your setup I suspect you should be up and running very quickly by changing the drive letters to upper case. As an extra precaution make sure your S drive is succesfully mapped before processing. If the S drive becomes disconnected at the time of processing the mapping rules will fail as the program will not be able to find the tracks you have stored on your S drive.



The fact that the program crashes at the end of the processing suggests that it may be having difficulty saving the destination XML file to your NAS. Please confirm that your Destination Library path is either S:\iTunes Library.xml or S:\iTunes Music Library.xml and that you can create a test text file within S:\. Sonos will pick up the xml file with either of the two filenames. A screenshot showing the application and the error message at the time of the crash will be helpful. Plese move the error message so that it is not obscurring the configuration of the app. You will find my email address on my profile page on these forums. Please attach the screenshots to an email in PNG or JPG format to keep the email size low.



I hope all that helps. It sounds like I may need to do a few user useability tweaks and also improve the error handling. The feedback is very helpful for me improving the application.



Thanks for trying the application. It sounds like you are almost there!!!



One other thing that I should mention is that I have only tested the application with the Microsoft .Net Framework version 3.5. If you have a different version installed there could possibly be a compatibility issue.



I hope to here from you soon.



Regards



Darren
Darren



Your advice worked a treat. I had the drive letters in lower case. I had also set up multiple rules, with the one you cited in your last post as the first one. I deleted them all and started again with just one rule, with the drive letters in upper case, and have had no problems since. I have also successfully added further rules since.



Since then, I have also only had one crash. Still can't tell what is causing it. The S: drive is permanently mounted, and the destination library path is as you describe. The fact that it is hit-and-miss suggests to me that there is could be a conflict with some other background software, perhaps? The other possiblility is that it is a timeout on writing the library file - my NAS has a disk spin-down feature which puts it in a lower power mode on idle. It takes about 10-20 seconds to spin back up if there has been no activity for a while. DOes this give you any clues?



I will try to email a screenshot of the error message.



Thanks again, from a happy user,



Jeremy
Jeremy,



It's good to hear that you have my application working. It may not be working with best performance however.



I have taken a look at the error message that you sent me. The error was a system.io.exception (Input/Output) at the time of "saving the track mapping data" (mapping cache file). This file by default is saved to the same location as the source iTunes Library.xml file (at C:\....\ My Music\iTunes (J+R)\iTunes Library - Track Mapping Data.csv in your case)



Please check to see if this file has been created and the modified time of this file? If the file has never been created, there will be no cache so subsequent runs will continue to be slow. With the cache file in place 10,000 tracks are processed in about 20 seconds on my PC instead of several minutes. This greatly improves the useability of the application.



I should add some error handing to the saving of all of the files. This would then give me, more details about the nature of the error. It could be a file permissions issue. Are you able to create a temporary text file within your iTunes folder and do you have plenty of free space on your C drive?.



Unless you also get errors when the status in the bottom left hand corner is "saving destination library" then there is not an issue saving to your NAS.



I tried creating a new version of my app where the find and replace rules ignored the case of the paths. This however greatly reduced the performance of the application. I may just add extra validation so that any absolute paths entered with incorrect case are adjusted upon saving the configuration.



Thanks and regards



Darren
Hi,



Tonight I have uploaded version 2.70.3 (http://www.darrenlink.talktalk.net/ituneslibrarymanager/download)



This version includes the following updates:



1) I have added error handling to the file saving routines. If any of the files fail to save you should now get a meaningful error instead of the application crashing.



2) I have ensured that all file paths are saved with the correct case. This includes any absolute paths specified for source path find or path replace. Remember that the find and replace functionalirty is case sensitive. If your music folder is called C:\Music and you enter c:\music within a find field it will be changed to C:\Music. The same is the case for the replace fields.



3) I have fixed an issue with the find best match functionality when running the transformation rules. The best match is found for the disk number and track number specified within the filename.



Regards



Darren
I would like to play directly from iTunes to a Sonos player. Does anyone know if there is a plugin, or something like that, for iTunes available. (I have tried already to work with the Sonos Queue Tool from SteveEisner. This gives me only errors.
I think this is a bit off topic so perhaps a mod could move it, but the answer that seems bulky but would work immediately would be to audio line output from the computer you are using itunes on into an audio input on any sonos player. Then any 1 or more of your sonos players (that one or others) can access the line input as the audio source and play whatever it is you are commanding itunes to play.



I do have to ask though, why? is it mainly because you like the interface better on itunes than whatever sonos controller you are using? or an actual feature? I ask because I used itunes a ton before but just import everything into sonos now, even my itunes smart playlists.
Hi,



It's been a while since I last posted but tonight I have produced a guide for structuring both lossey and lossless music for use with my app.



The guide is at:

http://www.darrenlink.talktalk.net/ituneslibrarymanager/tutorials/MusicStructureGuide.pdf



I have made a few changes recently to the application itself but unfortunately I have not had the time to fully complete all changes and to fully test them. Many apologies to those waiting for a promised update.



Darren
Hi Darren,



I have a problem that seems to be fixable with your ingenious software. After some initial trial and (mostly) error I 'm not sure I do things correctly and I'm therefore asking for some help.



My setup is similar to your setup with two separate places for storing my music files. The original music files (mp3) and the iTunes library are place on my laptop and a copy of these is placed on my NAS. I have not gone through the effort to make lossless copies yet so for the moment I just want to have my zoneplayer (ZP90) to use the music files and playlist in the iTune Library.xml mirrored on my NAS.



The only hiccup is that my laptop is a Mac and I can therefore not run your software on it. I do however have a PC at home as well so I thought I could simply copy the MacBook iTunes Library.xml on to my PC and run it through your software.



Since I only want to import into the ZP some of the iTunes playlist I only select the source library (the iTunes Library.xml now placed on my PC) and the iTunes Library.xml place on my NAS (viewable to the ZP). I then click the radio button "Choose playlists to include in output file" and tick the box "Choose playlists upon processing" and select the playlists I want converted.



In my overly optimistic mind I thought that the paths to the files in the selected playlists would be exchanged by the new path on my NAs regardless of the initial path but there seems to be more to it than that and obviously the output was not what I suspected (i.e nil).



Is there any way I could do it differently and make it work with my pc-mac-nas setup?



Even if I have not yet made it work myself I thank you for making this software which must save a lot of people so much time, sweet and pain.



Cheers,

Claes
Claes,



When you run my application under Windows it will need to produce paths that are accesible from Windows.



You have stated that your test MP3 on your nas is at the following location (from your MAC)



Volumes/media/Musik/CDs/test_song.mp3



but windows will not be able to locate the track at this path.



Can you access your test mp3 using the following path (where nasdevicename is the device name of your nas)?



\\nasdevicename\media\Musik\CDs\test_song.mp3



If so you may have success using the following rules:



search: Users\macpro\Music

replace with: \\nasdevicename\media\Musik



If this doesn't work, I'll take a look at my code to identify the problem.



My music is on a Z drive on my windows PC so my rules are simply:



search: Z:\Music

replace with: \\nas\sonos\Music



Notice that backslashes (\) are used in my rules but the path that is written within the XML file will have forwardslahes (/)



Darren
gblasius,



Unfortunately my apllication is currently only compatible with Windows. I have done some inital research into creating a Mac version but it would be very difficult to develop as I do not have a Mac myself.



Regarding your other question, I have created a feature in my app that will attempt to match filenames if the source and destination filenames begin with the track number followed by a space and there are subsequent differences in the filenames.



Let me explain...



Say you have a local file called

Z:\Music\Darren\Artists\Beatles, The\Albums\Revolver\03 I'm Only Sleeping.mp3

but the high quality version on the nas was named:

\\nas\sonos\Music\Darren\Artists\Beatles, The\Albums\Revolver\03 Im Only Sleeping.m4a (without the quote in I'm) ...my application would suggest that the two files were the same track and will give you the option of renaming the destination track so that's it's filename (minus the extension) matches the source filename. Alternatively you can choose not to rename the destination track and match the two files anyway. Once the files are matched and are in the track mapping cache file you will not to re-map the two tracks again. If the source and destination filenames are identical after ignoring the extensions, the tracks will me mapped automatically without any prompts.



If you have a destination track that is located on your nas in a completely different directory structure to the source file you could always add an entry to the track mapping data manually. The track mapping data is simply a csv file that can be manually edited. For simplicity however I'd recommend keeping your directory structure the same wherever possible.



Unfortunately if the low quality and high quality version of a track have tagging differences, my application will not spot this and will not alter the tags. Other than promting where necessary to rename files, my program does not modify your audio files. I generate my MP3's from the Apple Lossless version after perfecting my tagging so that both copies have identical tagging information.



Darren
I believe my file names begin thus (04)TRACKNAME.FLAC.



Where the track number is in parens....however, there are probably some which use spaces as a delineator, and some which use hyphens!



don't know if your program would recognize these, but as a suggestion, perhaps you could give the user the chance to name the template (ala Exact Audio Copy).



Regarding 1 - I have a windows emulator, so perhaps your application would work...but to be sure - what is an file with extension .msi?



Really appreciate your help, this is exactly what I need (I hope)!!
Gblasius,



The msi file is a Windows installation file. Ultimately it extracts to an exe file that has been compiled using the Microsoft .Net 2.0 framework. It was written in C# using Visual Studio 2008.



I'll have a think about your other suggestion. With your naming convention the program would work (at least under windows) but any filenames that are not an exact match would need to be manually renamed. Any tracks in your source library where a destination equivalent cannot be found are written to the non mapped tracks report. It would be useful to improve the auto-mapping feature when the filenames are not an exact match. Thanks for your thoughts.



Darren
Darren, just wanted to say I've come across your program for the first time, as I've hit the limit of 40,000 tracks in iTunes Playlists on the Sonos system (lots of nested Playlist folders and I don't want to restructure them!) A quick Google search and I was led here... I've successfully used your application to cherry-pick the playlists I want and that is working great, so thanks, you solved my problem!



I tried to play around a bit with the transformation rules, specifically I put in transforms just for one sub folder, as I wanted to test. I ended up getting nothing in my playlists except tracks listed in my transformation, so looks like its all or nothing?! I also have a suggestion if you are still developing this program, don't know if its easy or not: When you deselect the "Define transformation rules" box, it would be useful if it doesn't remove all the existing rules, but rather was a toggle on/off button within the code itself - that would make it easier to test without having to re-define the rules each time...



My big issue (not for you to solve!) is that I currently store all my music on my PC, mostly in MP3 but I've started re-ripping in FLAC - with 400+ CDs, its going to take a while! Its under ..\Music\MP3 and ..\Music\FLAC I then mirror everything to my NAS drive for the Sonos controller to pick up. This also functions as a useful backup location just in case... I edit the Tags so the FLAC albums have a leading < character in the Albumname. Then I get both showing seperately in Sonos. The way your transform rules work, I will have to change my folder structure so that I have a folder for "Highest quality" stuff (lossless & lossy where there is no lossless equivalent) and one for MP3s only. Then the HQ stuff will get backed up to the Sonos share and the LQ stuff will have to get backed up to another non-Sonos share. Would really like to create a ..\Music\LQ and ..\Music\HQ folder structure but don't fancy updating 10K+ tracks in iTunes! Ughh.... I really need to plan this!



Anyway, I hope your situation is better than last time you posted, thanks again and good luck!

-Durwin
Durwin,



Many thanks for providing feedback for my application. Below are my responses



just wanted to say I've come across your program for the first time, as I've hit the limit of 40,000 tracks in iTunes Playlists on the Sonos system (lots of nested Playlist folders and I don't want to restructure them!) A quick Google search and I was led here... I've successfully used your application to cherry-pick the playlists I want and that is working great, so thanks, you solved my problem!



That's great news. I'm glad this part of the application solved your playlists problem. Nested playlists (i.e. playlists in folders) really eat into the Sonos memory, especially if Smart Playlists are used. I like having the flexibility so that only my favorite/most used playlists are imported into my Sonos system. I have a lot of unused playlists in my iTunes library that I really should delete but don't want to as I spent ages creating them all!!!





I tried to play around a bit with the transformation rules, specifically I put in transforms just for one sub folder, as I wanted to test. I ended up getting nothing in my playlists except tracks listed in my transformation, so looks like its all or nothing?!





You are correct. The application is designed to transform all paths in your iTunes library that are not indexed by Sonos to paths that are indexed by Sonos. In my setup my last rule is a catch all rule that transforms MP3's in Z:\Music (local PC drive) to MP3's in S:\Music (Sonos share \\nas\sonos mapped as a network drive [S:\]). For each track the first rule that finds an alternative equivalent is used. If none of the rules are able to find an alternative, the path is changed to something like 'track not found' (i.e. an invalid path)





I also have a suggestion if you are still developing this program, don't know if its easy or not: When you deselect the "Define transformation rules" box, it would be useful if it doesn't remove all the existing rules, but rather was a toggle on/off button within the code itself - that would make it easier to test without having to re-define the rules each time...





I understand your issue but there is an existing alternative for testing different configurations. The application supports multiple iTunes libraries so you can have a different configuration for each library for your household. For testing you can create a test configuration by going to Library -> Add New iTunes Library. This will create an additional configuration tab and you can specify the same source Library as in your original configuration. Use the first tab for your playlist cherry-picking configuration and use the second tab for your test configuration. You can give each configuration/tab a description. I'd prefer to keep the interface the way it is as I feel it's good that the whole transformation rules section is not visible for users who do not require them. It's quite an advanced feature that takes some getting used to, and not everyone wishes to use it or see it. I would probably implement your request if I had the time but unfortunately work is very busy at the moment!!!





My big issue (not for you to solve!) is that I currently store all my music on my PC, mostly in MP3 but I've started re-ripping in FLAC - with 400+ CDs, its going to take a while! Its under ..\Music\MP3 and ..\Music\FLAC I then mirror everything to my NAS drive for the Sonos controller to pick up. This also functions as a useful backup location just in case... I edit the Tags so the FLAC albums have a leading < character in the Albumname. Then I get both showing seperately in Sonos. The way your transform rules work, I will have to change my folder structure so that I have a folder for "Highest quality" stuff (lossless & lossy where there is no lossless equivalent) and one for MP3s only. Then the HQ stuff will get backed up to the Sonos share and the LQ stuff will have to get backed up to another non-Sonos share. Would really like to create a ..\Music\LQ and ..\Music\HQ folder structure but don't fancy updating 10K+ tracks in iTunes! Ughh.... I really need to plan this!

-Durwin




For simplicity and backup purposes, I would like to have complete local MP3 and lossless folders that are both mirrored to my NAS and indexed by Sonos. Unfortunately if you have the same track in both formats the Sonos indexer will pick up both files and you will end up with duplicates in your Sonos library. I therefore maintain my Sonos share manually (rather than mirroring) so that it only contains the highest quality version of each track. For backup purposes I regularly mirror both my local setup and my nas Sonos share to a backup drive that is not indexed by Sonos.



As I have recently upgraded my 250 Gb NAS to a 2Tb one I may use your suggestion going forward and mirror everything from my local drive to my NAS. (i.e. complete MP3 folder, and folder containing just the highest quality version of each track). Your post has certainly given me some food for thought.



If you have C:\Music at the moment for your MP3's and your iTunes library uses all of these you could do the following:



1) Copy C:\Music to C:\Music (LQ)

2) Create a new configuration in my app to replace C:\Music with C:\Music (LQ) for all tracks and generate a new iTunes.xml file locally

3) Create a new empty iTunes library (hold shift key down as you double click on iTunes and keep it held down until you get the option to create a new library). Then import the generated iTunes.xml that points to your tracks in C:\Music (LQ)

4) Scrap your original iTunes library, but only once your are fully happy!!!!! Be very careful!!!

5) Rename C:\Music to C:\Music (HQ)

6) Gradually replace the MP3's within C:\Music (HQ) with their FLAC equivalents as you rip them

7) Mirror both folders to separate shares on your NAS (perhaps with Robocopy) but only index the HQ share.



I hope the above suggestion helps.



Regards



Darren
Thanks for the reply Darren, sorry I only just thought of checking this forum now! I decided in the end that I wanted to re-rip my library as it had developed over several years and I'd changed MP3 encoders, bit-rates, formatting of ID tags etc - this gives me a good excuse to start again! I decided to keep the existing files as they were, and created new \Music\HQ and \Music\LQ folders. I'm putting the newly-ripped FLACs into the HQ folder and new MP3s into the LQ folder, then deleting the originals wherever they may be. The new HQ stuff goes to my Sonos-indexed share on the NAS, along with all the older versions; the LQ just goes to a another share for backups (and into my iTunes library).



As time goes on it all gets neater and neater in the Sonos music library, its all good fun! Eventually I'll be left with some folders in my older structure, and will have to work out where they came from and what to do with them! I set up the transform rules (convert MP3 to FLAC, else leave as MP3) and they work fine now over the whole music folder, so that's great, plus of course I get to select which playlists to bring across to avoid hitting the maximum. It all works great!



I never looked at the "Add New iTunes Library" option till, now, so that makes sense rather than re-code for my suggestion - thing is, I haven't looked at multiple iTunes libraries before but I think that may be useful. I manage my wife's iPod along with my iPod & iPhone, all from one library at the moment. My whole system is based on song ratings, only 3+ gets on my iPhone due to space limits, 2+ on my iPod. My wife just has her music in one playlist, not all of it stuff I would like and I'm always worried she will start rating her songs, causing me problems with my iPhone sync!! Plus I have other playlists for songs not listened to for a while, but of course, her stuff wouldn't show in that because she listens to them! I presume multiple libraries would sort this out, but I'm so nervous to mess around with it in case it all goes wrong - I guess I have backups of the whole iTunes folder so I could try it out...



Is the "iTunes Music Library.xml" the sole source for iTunes, would just that file alone let me recover from an iTunes screwup? I don't know what the .itl or .itdb files do...



Just rambling now, I'm inspired to learn how to code a VB program to read the XML file and give me a more accurate rating of my albums, its annoying that iTunes doesn't properly sort my albums by rating - e.g. it just lumps all the 4* albums by album name I think - you can see in the XML the album rating is either 20/40/60/80/100. I used to program a long time ago, done a little VB recently so I should be able to manage it...



Thanks again,

-Durwin
Hi Durwin,



I am very pleased to hear that my app is working well for you.



The iTunes .itl or .itdb files are the main database files for iTunes. The XML file is updated/derived from the main database files each time iTunes is closed. If you create a new empty iTunes library it is possible to import an XML file to recover the full library but the import takes a while for a large library. I recommend that you back up all of the files.



From my mp3 iTunes XML file I can generate my lossless version (pointing to my apple lossless files) using my app and then import that file into a new iTunes empty library to create the equivalent lossless version of my library. This won't work for Flac files however as iTunes cannot import or play them.



Having multiple libraries can be handy but switching libraries could be easier. You may consider creating separate Windows user accounts for yourself and your wife. Each user profile will have their own iTunes library files under My Music and you will not need to worry about switching iTunes libraries as you start iTunes.



If you are interested in learning C# I could send you my Class that reads in the XML file, manipulates it and re-saves it. As iTunes ignores the XML files upon startup you will need to re-import a modified XML file into a blank iTunes library to see your modifications.



One feature of my app that I haven't really talked about is the ability to create a new XML file with stripped out track user data such as play counts and ratings. You may wish to create an XML file with this information stripped out before importing your library into a new blank iTunes library for your wife.



Thanks for your feedback.



Darren
I had a quick chat with www.simplysonos.co.uk over lunch today about buying two Play 3's as a retirement present for my dad. I have asked them if anyone has any contacts at Sonos that could provide a sample C# .Net solution for kicking off the Sonos indexer reliably. I hope they are able to come back with something. I'll then be able to incorporate it in a new release. It's a much needed missing piece to my app. I will make it an optional feature of course. It'll probably be disabled by default but easy to turn on.



I have rather neglected this thread since last summer and haven't made any changes to the application since the last release.



I must work out how to do a poll to get an idea of how many people may be using my application. I have absolutely no idea and would love to know !!! There have been over 20,000 views of this thread but I may have scared a lot of people off giving it a go with all of the geek talk. I should create a simple "best practice / step by step" guide for how to use it. For anyone living near Ashford, Kent, UK I could provide some help with library set up and hands on training.



Fingers crossed for the technical help from SimplySonos.



Darren
I for one am still using it simply to copy the Library to my NAS. A great little application and I'm very grateful for it.
I have asked them if anyone has any contacts at Sonos that could provide a sample C# .Net solution for kicking off the Sonos indexer reliably.



Trigger the keyboard shortcuts?

Alt M

M

Enter



Maybe your Dad could just use the above shortcuts? ... Although if he hits Ctrl M he mutes the zone, and you get a support call I suppose :)



Barry (who handles his 86 year old Mum's PC support)