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.
I've uploaded a slightly improved version of my app today (version 2.26.0). The buttons for choosing the source and destination iTunes Library XML files are now functional.



Please note I have not yet implemented the 'Any Audio Format' or 'Any Video Format' options within the 'Source Media Type' drop down lists.



I don't think anyone has actually tried my application yet, so I'm interested in getting some feedback about it and making improvements. It's not fully completed and tidied up at the moment but it is fully functional for my needs (and hopefully others). At the moment I have not implemented the 'Any Audio Format' or 'Any Video Format' options on the Source Media type drop down lists. Apart from that it's fully functional. If you have any questions feel free to drop me an email or msn. Details on my profile and my application web page.



Here is a little more information about how I use my application and add new music to my iPod Library and Sonos:



I maintain a single iTunes library containing MP3's for use with my iPod. When I get a new CD I rip to Apple Lossless and do all my tagging and attaching of cover art to those tracks. When I've perfected the tagging, I then select the Apple Lossless tracks and convert them to MP3's using iTunes. I then move the Apple Lossless files to my NAS and then delete the broken lossless entries from my library (leaving just the mp3's in there). I move the generated MP3's to my prefered local drive location and re-link them in iTunes. I ensure that the paths to my local mp3 files are almost identical to the paths to the Apple Lossless files, so that a simple find and replace on the MP3 path takes me to the Apple Lossless path on my nas.



i.e. Z:\Music\Darren\Artists\Beatles, The\Albums\Revolver

can be easily changed to:

\\nas\sonos\Music\Darren\Artists\Beatles, The\Albums\Revolver

by replacing Z:\Music with \\nas\sonos\Music

(replacing Z:\ with \\nas\sonos would also work)

(Z is my local drive letter for music)



I find I can easly switch from a local directory of MP3's to the same directory on my nas by changing the beginning of the directory path (and vice versa)



I find it's more convenient to maintain playlists in my MP3 library as this is the library I synch with my iPod. I can create on-the-go playlists on my iPod and with a simple run of my program the same playlists are then on my Sonos system but pointing to the Apple Losslesss tracks. I cache the mappings from the lossy files (mp3's) to the lossless files to make the app as fast as possible. My source library of 10,000 tracks is converted and saved to my NAS in 22 seconds on my PC. (Without the caching / first run it takes about 6 minutes to run). Once the configuration is set up for your environment, you should find my app more convenient than doing a manual copy of the iTunes XML file to your NAS.



I have tested the app with FLAC files also, for those users who prefer this format to Apple Lossless. It's not so easy to produce FLAC files as well as mp3's using just iTunes however as iTunes does not support FLAC. Also if you use Apple Lossless the generated lossless xml file can be imported into a new iTunes library.



I'm hoping my application proves useful to the Sonos 'techie' community.



Have fun. Feel free to drop me an msn or email if you have any questions or issues with the application. I'll also be monitoring this thread for feedback.



Darren
I've uploaded a new version today (2.27.0) with icons added to the playlist selector for normal playlists, smart playlists, genius playlists and playlist folders. It's now easier to navigate your iTunes playlist structure and select which ones you want to transfer to your Sonos system.



Darren
I have an update to my application working on my PC. When I close iTunes it automatically starts my application and allows me to choose which playlists to move over to Sonos. After selecting any new playlists the custom iTunes XML file is automatically written to my NAS. (The application remembers which iTunes playlists are already on Sonos)



This means that the program could be used in a standard setup to simply copy the iTunes XML file across to your NAS. It eliminates the need to manually copy the XML file from your iTunes folder to your NAS with the added advantage of allowing you to choose which playlists to import into Sonos.



The process is very similar to Syncing a subset of your playlists with your iPod. The NAS takes on the role of the ipod.



The new version is not up on my website but I'm hoping to post the new version in the near future.
This looks like an excellent piece of software.

Many thanks!
Hi Butterboy,



Many thanks for your post. I have had several private messages from people who have read about my application, but so far I have had no feedback from anyone who as actually tried using it for their setup.



For the mapping to work from lossy files to lossless ones, admintedly it does require a setup with two directory structures the same.



With my new addition where the application kicks in after closing iTunes, people who wish to use the copy to NAS functionality (without using the lossy paths to lossless paths transformation feature) will also benefit.



Before I wrote my application I hated the manual copying of the iTunes XML file from my local filesystem to my NAS everytime I updated my iTunes library. I hope other users will also appreciate this benefit even if they do not use the lossy to lossless paths transformation feature. I intend to make the minimize to system tray and kick in when iTunes closes, optional features of the application.



At the moment I believe the application will iterate through every track in the iTunes library even if there are no transformation rules defined. I intend to make the transformation rules an optional section within the configuration. That way the program will only iterate through the tracks if there are path transformation rules to be processed.



If you'd like to have a go at setting up my application for your setup feel free to talk to me on msn about it. My msn address can be found on my profile page. The same goes for all other readers of this thread. (Please note that I am no longer using the msn address on my personal webpage about the app - I must change that page - See my address on my profile page for the time being)



Other users may be interested to know that I upgraded to Windows 7 on Tuesday and Sonos and my application are continuing to work without any issues. (I just hope I don't have any issues reinstalling my development sofware - C# .Net 2005 Express Edition so that I can continue my development work)



Many thanks again for your post



Darren



P.S. I also intend to re-add a "Kick Off Sonos Indexer" function that I had working in an early prototype version of the application. Again this will be an optional feature. It will automatically kick off the Sonos indexer once the iTunes XML file has been copied over to your NAS. If anyone out there has reliable C# code for kicking off the indexer I would appreciate input on doing this. Sometimes I found that there was a delay in kicking off the indexer with the code I have in my ealier version of the app.
Darren - sounds like your app might help me, but I am not really sure I understand what it does exactly. I am currently about 80% through re-ripping my entire CD library to 256 kbps mp3 and lossless FLAC files simultaneously, using dBpoweramp. I am putting these files into separate folders (the mp3s and FLACs are each in their own folders). My intent is to use the mp3s with iTunes and the FLAC files with Sonos. I am not sure exactly how to do this though, especially when I finish, and then need to add addtional CDs. Any insight you have would be most appreciated....
Darren - sounds like your app might help me, but I am not really sure I understand what it does exactly. I am currently about 80% through re-ripping my entire CD library to 256 kbps mp3 and lossless FLAC files simultaneously, using dBpoweramp. I am putting these files into separate folders (the mp3s and FLACs are each in their own folders). My intent is to use the mp3s with iTunes and the FLAC files with Sonos. I am not sure exactly how to do this though, especially when I finish, and then need to add addtional CDs. Any insight you have would be most appreciated....



what are you not sure about?



I am doing the exact same thing:

- using Dbpoweramp for multiple encoding at once into different folders:

- one for MP3, which is used by itunes

- one for FLAC used by Sonos



Every time I add a new cd, I have to update the Sonos (update music library, quite simple and fast) and iTunes (add new folder: unfortunately itunes does not work in a smart way: there is no way to ask him to rescan library just to add new files: it reloads everything every time, so this is why I just add folder, but this is annoying when you rip several cds at once)



let me know if you want more info
Firstly, I'll describe my setup. On my PC I have a folder called Z:\Music where all of my MP3's are stored. (My Z drive is simply a hard disk partition that I have used for iTunes MP3 purposes for years and could quite easily be C:\Music on a single partition PC). My iTunes library contains only references to the MP3 tracks stored on my local hard drive and is used to sync with my iPod. An important note is that I do not allow iTunes to organize where my files are stored. I have "Keep iTunes Media Folder Organised" unticked and choose where I want my files to be stored. My iTunes library files are also stored on my local PC rather than my NAS (in C:\Users\Darren\Music\iTunes\). It is possible to store your iTunes library and tracks within your nas share but I have never done this for performance reasons. (Note. I have Windows 7. On older versions of Windows your iTunes libray files are likely to be stored within c:\Documents and Settings\username\My Documents\My Music\iTunes)



On my NAS I have a sonos share (\\nas\sonos) that simply mirrors the structure of my Z drive but each folder contains 'Apple Lossless' copies of each track instead of MP3's. It is important that you have your lossless tracks in a share that does not also contain the MP3's. (i.e. your nas share which is indexed by Sonos should contain your lossless tracks, and your local hard drive which is not indexed by Sonos should contain your MP3's that are synched to your iPod). You will run into difficulties if you organise your music by Album\Filetype and then index. (You won't know whether Sonos has indexed the lossey or lossless copy of each track). So that I can easily switch from the lossey folder on my local hard drive to the lossless folder on my NAS I have an S drive, which is a mapped network drive to my \\nas\sonos share.



To give you a better idea of how this works, I'll now describe how a single track is stored:



Local hard drive:

Z:\Music\Darren\Artists\Beatles, The\Albums\Revolver\01 Taxman.mp3



NAS Path (Apple Lossless version of the above track)

\\nas\sonos\Music\Darren\Artists\Beatles, The\Albums\Revolver\01 Taxman.m4a



S drive path (mapped to \\nas\sonos)

S:\Music\Darren\Artists\Beatles, The\Albums\Revolver\01 Taxman.m4a



The advantage of having my \\nas\sonos share mapped as an S network drive (S for Sonos) is that when I am in a music folder on my local PC I simply change the Z within the file explorer path to S and I'm in the directory containing the Apple Lossless copies of the tracks. I can then get back to the MP3's by changing S back to Z within the folder path. ie. the paths within a windows file explorer window for the above tracks would be



Z:\Music\Darren\Artists\Beatles, The\Albums\Revolver (for the MP3's)

S:\Music\Darren\Artists\Beatles, The\Albums\Revolver (for the Apple Lossless equivalents)





I'll now go on to describe what my application does:



My application is totally configurable. Firstly it allows you to specify where your local iTunes XML file is stored (The Source Library file used for your MP3's and syncing with your iPod). This XML file contains details of each track and their location and also the playlists you have defined. The local file cannot be indexed by Sonos (unless it is in share). The application also allows you to specify the Destination Library file which should be a path on your NAS share that is indexed by Sonos.



In summary, the application basically transforms the Source Library file, based on a number of definable rules and writes the modified copy to your chosen destination location ready for indexing by Sonos.



In my setup my local iTunes library XML file is store at the following location (Source Library):

C:\Users\Darren\Music\iTunes\iTunes Library.xml



and the iTunes XML file written to my NAS is (Destination Library):

\\nas\sonos\iTunes Music Library.xml



The source library points to the MP3's on my local hard drive, and the generated destination copy points to the Apple Lossless tracks on my NAS. Within my application a rule is defined to change paths beginning with Z:\Music to \\nas\sonos\Music. The extensions of the files are also changed to the lossless extension. (i.e. .mp3 to .m4a)



Another handy feature of the application is that it allows you to choose a subset of your iTunes defined playlists to be moved across to your Sonos system. This is handy if you have a lot of iTunes playlists defined and you want to control which ones are imported into Sonos. It is particularly handy if you find you do not have enough Sonos memory to index all of your iTunes playlists. (This is easy to do if you have a lot of smart playlists spanning your entire iTunes library)



My application sounds complicated and is therefore not for a novice user. I do however hope that more advanced users will find the appliction useful. It is also important to note that the application is not supported by Sonos.



Some people within the Sonos community simply manage two iTunes libraries (one for lossey tracks and one for lossless tracks). This is a fine approach but it means any playlists you define in your lossey library need to be manually recreated in the second lossless library in order to get them on to your Sonos system.



With my setup I can create an on-the-go playlist on my iPod (i.e. MP3's). Once I have synched my iPod and close my library, my application automatically kicks in (a configurable option) and allows me to select the new playlist. Once the destination library has been written (less than 1 minute) to my NAS I can then re-index my Sonos system to get that playlist onto Sonos. The playlist on Sonos however is pointing to the Apple Lossless version of each track rather than the MP3's.



Both bhsbum and cboengrand have mentioned FLAC files. FLAC files are not supported by iTunes so this is the main reason I have chosen to use Apple Lossless as my lossless format. My application does however allow you to produce an iTunes XML file pointing to your FLAC files and Sonos indexes the library file without any problems.



When I get a new CD I open my MP3 iTunes library, rip to Apple Lossless and then tag the tracks and add album art. I then covert the Apple Lossless tracks to MP3 and then delete the Apple Lossless entires from my library (but not the files themselves). I then move the MP3's and Appless Lossless files to my desired locations, and then re-point the MP3 tracks in my library to the new location of the MP3's. Also when I rip I allow iTunes to produce filenames beginning with the track number.
Darren and cboengrand - thank you both for your posts. To answer your question, cboengrand, I was not sure if there is way to update BOTH iTunes and my SONOS share automatically. iTunes is very un-elegant (unless I am doing something wrong) when it comes to updating the library (as you described) - I do not want to have to "add a new folder" every time I rip a CD. I know that SONOS works very well in this regard. Darren, I will take some time and try what you suggest.
bhsbum,



If you continue to rip using dBpoweramp, you will need to manually add the ripped tracks to your iTunes library. You can either do this using 'Add a new folder' or you can simply drag the tracks from a windows file explorer window into iTunes. I prefer the later method. If you use 'Add a new folder' and choose your top most music directory, iTunes will probably add any tracks that have not been previously imported into the library. Please note that I have never tried this however. Can anyone confirm? I have always used the manual approach of dragging any new tracks into my library. That way I have precise control over what I am adding. I don't add tracks to my iTunes library until I know I have the time to tag the tracks that I have just added.



In the latest version of my application (yet to be uploaded to my site) I have added the following features:



1) The ability to find any broken links within your iTunes library. (i.e. tracks where the location has been manually altered since the import into the library). These tracks appear with an exclamation mark next to them when you click on them in iTunes. If you double click on them iTunes gives you an ability to specify their new location.



2) The ability to scan a specified directory (and all sub directories) for tracks that are not present within your library. This will be useful for finding any tracks that you have downloaded or ripped using an alternative to iTunes, but haven't yet imported into your iTunes library. The program just lists the tracks that have not been imported (it does not do the importing)



If you find the way you add tracks to iTunes un-elegant, you will probably find organising both lossless and lossey copies of each track time consuming and frustrating. Producing and organising 2 copies of every track in lossey and lossless formats is not an easy task, but I believe my application adds value to any one who wishes to do this. It prevents a need for having two distinct iTunes libraries and means that all of your playlists are in the same place.



I like to choose the folder structures for my music and I find moving tracks from their default import location to my preferred location a litte frustrating. One you have physically moved the track files they appear as broken links within iTunes and then you have to manually choose the new location of each track. I find this part of iTunes unelegant and wish there was an easy way of moving tracks for an entire album to a different folder. Does anyone have any tips on doing this more efficiently?



If you wish to have a chat on MSN, please find my address on my Sonos Forums 'Contact Info' page.



Darren
Darren:



Will you be posting the updated version and, if yes, then when as I am in the same boat as many (dBpoweramp for ripping, manual importing) and the use of the updated version of your application/tool would be most helpful.



Thanks so much.



Joel
Joel,



I have tomorrow afternoon off work for Christmas Eve, so after I've finished wrapping all the presents I intend to post the latest version of the application on my web site. The version on my web site is quite old now. The latest version has been tidied up quite considerably, has an option so that the program can kick in and transform your library file as soon as iTunes is closed and the ability to analyse your iTunes library XML files for stats and broken links.



I am off work until the 4th January so I'm hoping to do further developments during this time. Feedback and suggestions for improvements would be useful. I should be around a fair bit over Christmas so feel free to catch me on MSN for a chat about the app. (My MSN address is on my Sonos forums profile page as previously mentioned)



Darren
Joel,



I have tomorrow afternoon off work for Christmas Eve, so after I've finished wrapping all the presents I intend to post the latest version of the application on my web site. The version on my web site is quite old now. The latest version has been tidied up quite considerably, has an option so that the program can kick in and transform your library file as soon as iTunes is closed and the ability to analyse your iTunes library XML files for stats and broken links.



I am off work until the 4th January so I'm hoping to do further developments during this time. Feedback and suggestions for improvements would be useful. I should be around a fair bit over Christmas so feel free to catch me on MSN for a chat about the app. (My MSN address is on my Sonos forums profile page as previously mentioned)



Darren




Darren:



Fantastic news noting that I look forward to trying / using the new version...the one problem that I did have with the old version was that at random times -- and I could never figure this out -- it doubled the albums in iTunes meaning that as a backup I was always made a copy of the iTunes library before running the applications...that said, perhaps making a default copy before running it would be a beneficial safety feature...any thoughts?



Thanks,



Joel
Joel,



As promised the latest version of the application (version 2.55.0) is now up on my download page at http://www.darrenlink.talktalk.net/ituneslibrarymanager/download



This version is a substantially tidied up version from the one previously posted (version 2.29.0)



I hadn't realised that you or anyone else had tried using the earlier versions of the app. I'm not sure about the doubling up issue that you reported. Are you ensuring that only one copy of each track for each album exists within your master (lossey) library and that only the lossless copies of each track are within your share indexed by Sonos? Also make sure that only the destination "iTunes Music Library.xml" file is stored within your Sonos share.



After you have extracted the new version of the application and run it for the first time, it will detect that there are no iTunes libraries defined and it will ask you if you wish to define one. Answer Yes and a new unsaved configuration called "New Configuration 1" will be created. I rename the configuration to "Sonos Transformation". Select your source "iTunes Library.xml" stored on your local drive that points to your lossey files and then choose the path to the destination xml file on your NAS. The transformation rules are now optional and you have more control over what playlists are included in the destination library file that is written to your NAS. A new feature also allows you to clear user related data in your library such as play counts and track ratings. This feature is useful if you want to copy your entire library to a partners PC and wish to clear the user based data so that they can start with a fresh library. The destination XML file can be imported into an empty iTunes library to create a full "iTunes Library.itl" file.



Under Edit setting you now have the option to minimize the application to the system tray at startup and to listen for the closure of iTunes. When listening for the closure of iTunes, notifcation messages will be displayed about the current status of the application and iTunes but these notification messages can be surpressed within the settings. It is best not to enable the system tray and iTunes listening functionality until you are happy with your configuration.



I won't be around tomorrow and boxing day but if you have any issues I'll aim to respond on Sunday. If you continue to have your earlier issue I will do my best to help you sort that out. If you have MSN we can chat online to work through your issues.



I recommend using the analyse library function for your destination library to check that all of your tracks are pointing to the lossless files. Also check the contents of the "Mapping Cache File" to see the one-to-one mappings between your lossey and lossless files. The Non Mapped tracks file is useful to find any source files where an equivalent destination file has not been found as a result of the transformation rules that you have defined.



I hope you enjoy the latest version of the app.



Have a great Christmas



Darren
Darren - thanks very much for your hard work on this app. I still must download it, but I very much look forward to trying it out, as I am also off work for the next 10 days or so!
It's 4am here in the UK and I have just updated my website (http://www.darrenlink.talktalk.net/ituneslibrarymanager) with the latest version of my app (2.57.0). I have also updated the screenshots of the application (running under Windows 7 instead of XP) and have added details about the minimize to system tray and listen for closure of iTunes functionality. All the latest developments have been done under Windows 7 but hopefully the application will continue to run as expected under Windows XP.



I am keen to hear feedback from the Sonos community about the application so that I can continue to provide improvements. Enhancement requests will also be welcomed.



Users who do not wish to use the transformation feature for transforming lossey paths (e.g mp3's) to lossless paths (e.g to Appless Lossless or FLAC) can still benefit from my application. If your library consists of MP3's for example, these files as well as the iTunes library files can now be stored on your PC (instead of just being on your NAS). You can mirror the audio files to your NAS using an application such as robocopy and you will gain performance benefits when synching your ipod as well as having a backup of your MP3's (in case of PC or NAS failure). Having your audio files on your PC as well as your NAS is much better for laptop users as you will have access to all of your music within iTunes when you are away from home and you don't have access to your NAS. All of my MP3's on my PC are also mirrored to my girlfriends laptop using robocopy and she also has a copy of my entire iTunes library. I used my application to remove Rating and track play details from a destination "iTunes Library.xml" file and then imported this file into an empty iTunes library on my girlfriends laptop. Before doing this I ensured that all the files were in exactly the same location as on my PC (Z:\Music) so that the import of the XML file would succeed. With the ratings and play count information removed on her PC she is now able to create smart playlist based on her own track ratings and play information (play count, last played etc). She also has my "iTunes Library Manager" application running in the background on her PC and any playlists that she creates within her iTunes (or on her iPod touch) can also be imported into our Sonos system. On her laptop the configuration simply writes the destination "iTunes Library.xml" file to a different share on our NAS (\\nas\sonos_charlotte\iTunes Library.xml) but the file points to the lossless tracks under our \\nas\sonos share. The sonos indexer will quite happily import iTunes playlists from more than one "iTunes Library.xml" file. The setup is great as we both have our own iPods and have different tastes in music. Her 5 star tracks are completely different from my 5 star tracks and yet we can both have smart playlists based upon track ratings within our Sonos system. We are both starting playlist descriptions with our own name so that we can easily find our own playlists within Sonos. (Playlists from both our PC's are merged together under imported playlists within Sonos).



Please continue to note that this application is in no way supported or endorsed by Sonos themselves, and I cannot accept liability for any loss of data as a result of incorrectly restructuring your music. If you are in any way unsure how to move or restructure your files then please request assistance from myself or the sonos community. Unless you are %100 sure of what you are doing please ensure that you take a backup of all of your music and library files before making any strctural changes etc. For those users who store their MP3's and iTunes library solely on their NAS, a tutorial on moving the MP3's and library files to your local PC's is likely to be beneficial. (This is somthing that I can offer guidance on and may write a future tutorial on, if there is enough demand for one)



Joe and Bhsbum: Many thanks for your interest in my application so far. If you would like guidance on how to get the application working for your music collection, please let me know how your music is currently organised. I recommend getting the application working for a single "Album" before reorganising all of your music. Create a playlist for that single album and see how you can select that playlist from within my app.



Have fun with the app, but please ask if anything is unclear and take backups before making any changes.



Darren
I have just posted version 2.58 (http://www.darrenlink.talktalk.net/ituneslibrarymanager/download/2.58.0/iTunesLibraryManager.zip) which has the ability to kick off the Sonos indexer once the destination "iTunes Library.xml" file has been written to your NAS. By default this Sonos functionality is turned off, but once it is enabled (Under Edit Settings) and the application has been restarted you will see an additional option under each iTunes library configuration tab to start the Sonos indexer once the destination "iTunes Library.xml" has been written.



Credit goes out to Steve Eisner, whose C# code I have adapted to kick off the Sonos indexer. Once the Sonos functionality is enabled the number of detected Zones will be shown in the bottom left hand corner of the application. If no Sonos zones are detected the application will fail to kick off the Sonos indexer. (You will need to allow Windows to connect to your network for it to detect your Zone Players) There is an additional button to kick off the Sonos indexer whenever you wish. This button is disabled until at least one Sonos zone is detected.



I have noticed that after kicking off the Sonos indexer via my app, the desktop controller does not show that the system is busy indexing the music. The original wireless controllers (CR 100) show that the system is indexing after a short delay.



Feedback on the reliability of the Sonos indexer will be greatly appreciated. Under development tonight I noticed on occasions that the application failed to detect all my Zones but I have not experienced this problem with the release version that I have posted.



I hope you like the update. Any questions or problems please ask and I will do my best to help.



Regards



Darren
Hi Darren,

Many many thanks for writing this application I think it is very close to solving my SONOS library problems, but there is one additional feature that would be very useful to me.



Some background ...



I have all my music on a NAS share within the following folder

//NAS/Media/Music/MP3

//NAS/Media/Music/FLAC



I have all FLAC tracks duplicated in the MP3 sub folder for my iPod. However I also have other MP3 only tracks that I don't have FLACS.

If I point SONOS at my Media share on the NAS (using SMB) it picks up FLACs and MP3s and I end up with duplicates in my library



In Windows 7 explorer the //NAS/Media folder is mapped to M: drive, so in my iTunes.xml file everything points to //localhost/M:\Music\MP3



I can change this to //localhost/M:\Music\FLAC using your application BUT for those files that are not available in FLAC it replaces the record with 'record not found' - I would like it to continue to point to the MP3 file so that SONOS can use the FLAC files when available and if there are none it uses the MP3 files. Is this possible?



Also is there a particular reason why the output iTunes.xml file has to be on the NAS. Can I not just put this in a new folder on my PC and point the SONOS library to this bearing in mind that this new file is pointing to my M:\Music\FLAC (and hopefully M:\Music\MP3) files



Regards

Gordon
Gordon,



If you are indexing your //NAS/Media share and you have a track in both MP3 and FLAC formats (in the MP3 and FLAC subdirectories) the Sonos indexer will pick up both files resulting in duplicates within Sonos. This will be the case no matter what "iTunes Library.xml" file is found and indexed. This is because the "iTunes Library.xml" is used to import playlists, rather than to control which tracks are indexed by the Sonos indexer.



For this reason I keep all of my lossey tracks (mainly MP3's) on my local PC and my lossless tracks (Apple Lossless) on my NAS. I have many tracks that I only have a lossey copy of and these are stored both on my local PC and on my NAS (keeping the folder structures the same). I always ensure that I only have the highest quality version of each tracK within my NAS share that is indexed by Sonos (and no other lower quality versions of the same track available to the Sonos indexer)



Here is what I recommend (but please read and fully understand before you do anything)



If you are confident that all of your tracks within iTunes point to M:\Music\MP3 (where M is mapped to \\NAS\Media) you could copy your NAS MP3 folder (//NAS/Media/Music/MP3) to a local folder such as C:\Local Media\Music\MP3 and then make C:\Local Media a share on your PC. This share could then be mapped as an M network drive on your local PC (instead of pointing to your NAS). The paths to all of your MP3's within iTunes will not need updating but they will be pointing to your local PC instead of your NAS. After doing this you would be able to remove any MP3's from //NAS/Media/Music/MP3 that are also available in FLAC format under //NAS/Media/Music/FLAC. (i.e remove the lower quality duplicates from the share indexed by Sonos)



If you have multiple transformation rules within your configuration it will attempt each rule in turn until it finds a destination track to point to. If all rules are applied and no equivalent track is found then the application changes the path within the XML file to "No equivalent found"



In your scenario I would set up the following transformation rules



Rule 1

~~~~~~

Souce Media Type: MPEG Audio File (mp3)

Source Path Find: M:\Music

Path Replace: \\NAS\Media\Music

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



Rule 2 (If the equivalent FLAC file is not found via Rule 1 this rule will be used to find the MP3 on your NAS)

~~~~~~

Souce Media Type: MPEG Audio File (mp3)

Source Path Find: M:\Music

Path Replace: \\NAS\Media\Music

Destination Media Type: MPEG Audio File (mp3)



If you change the rules I recommend deleting the "Mapping Cache File" and my program will recreate it from the new rules.



Finally your last question. The "iTunes Library.xml" file can be on any share that is indexed by Sonos but you must remember that the share that it is stored on must be available when you re-index Sonos. I therefore think that the best place for your "iTunes Library.xml" is on your NAS. The Sonos indexer will import multiple "iTunes Library.xml" files. These can be stored in the same share, or they can be in different shares. In your scenario I would set the Destination Library Path to: \\nas\Media\iTunes\Gordon\iTunes Library.xml or \\nas\Media\Music\iTunes\Gordon\iTunes Library.xml depending on your preference). If another nember of your family wishes to have the MP3's on their laptop or PC they could be mirrored from your local PC to their laptop retaining the same M:\Music access that iTunes is using to find the MP3's on your PC. If the paths to the MP3's are the same on a second PC, you can simply copy the 'Source Library' iTunes Library.xml file that is generated from iTunes to the secondary PC and then import this file into a blank iTunes library. Also if you wish, you could use my program to generate a modified copy of your "iTunes Library.xml" file that doesn't contain any playlists or user related data such a ratings and play counts. This is what I did for my girlfriends laptop where my local MP3's are mirrored to.



I know that the above trick of creating a 'Music/Media Partition' share and mapping it as a network drive on the same PC works. I have this setup on my PC to save re-partitioning my drive and assigning a drive letter to the physical partition that my Music is stored on. In the past I had a Z drive physical partition for storing all of my music (Z:\Music) but when I got a new hard drive I did not want to restrict the size of the partition for my Music so I used the share/mapped network drive trick so that I would not need to repoint iTunes to a different drive and location. I don't think there is any performance limitation in doing this as the network drive is pointing to the same PC (anyone, please correct me if I am wrong)



I have probably given you more info than you need, but if you have any questions please ask before you make any changes to your current setup. It is always best to be 100% sure before you make any changes. It is not straightforward maintaining lossy and lossless copies of each track but I hope my application makes the process easier. If you have lots of playlists you should find the feature for limiting which playlists are written to the Destination Library XML file useful. Also after you have done any restruturing you can use the "Analyse Library" feature to check that there are no broken links to any tracks. You can use the "Analyse Library" feature on any source or destination library XML file, or you can specify a different "iTunes Library.xml" file altogether via "Library -> Analyse iTunes Library XML file".



If you have a laptop it makes sense to store your MP3's and iTunes library files on that laptop so that the library and music can be used on your travels. Any playlists that you make on your travels can be imported into your Sonos system on your return, but they will be pointing to the lossless equivalents (for each track where a lossless copy is available).



Any questions, please ask. I understand that my application is not the easiest thing to understand.



Darren


Joel,



As promised the latest version of the application (version 2.55.0) is now up on my download page at http://www.darrenlink.talktalk.net/ituneslibrarymanager/download



This version is a substantially tidied up version from the one previously posted (version 2.29.0)





Although I have just returned from a short trip overseas I have downloaded the now latest and greatest version (2.58) and will give it a go the next time that I have a CR rip...should, knowing me, be over the weekend.



Appreciate you doing the work and getting this out.







[QUOTE=DarrenLink;93134]

I hadn't realised that you or anyone else had tried using the earlier versions of the app. I'm not sure about the doubling up issue that you reported. Are you ensuring that only one copy of each track for each album exists within your master (lossey) library and that only the lossless copies of each track are within your share indexed by Sonos? Also make sure that only the destination "iTunes Music Library.xml" file is stored within your Sonos share.

[\Quote]



As far as the doubling up goes please note:



1. All my lossless files and all my compressed files are stored on my NAS drive BUT under two different shares (i.e. one share is called AppleLossless, the other share is called MP3).



2. I am certain that only one lossless track exists for each album, that only one lossless track appears in the SONOS library, etc.





3. Perhaps to be clearer I was using iTLU separately for the lossless and lossy libraries. That is:



a) I would rip the CD in AppleLossless to the AppleLossless share drive using dBpoweramp.



b) I would convert the AppleLoss files to the MP3 files on the MP3 share drive using dBpoweramp's batch converter



c) I would then use iTLU separately on each share to add the files to the iTune library but, in each of the shares, the files would be doubled (i.e. not physically doubled on the drive but doubled within iTunes because the resulting iTL after running the application listed each file/song twice).



d) Thus, I stopped using the application but am very happy to give the new version a go...I will simply make a copy of my iTL before running it.







[QUOTE=DarrenLink;93134]

After you have extracted the new version of the application and run it for the first time, it will detect that there are no iTunes libraries defined and it will ask you if you wish to define one. Answer Yes and a new unsaved configuration called "New Configuration 1" will be created. I rename the configuration to "Sonos Transformation". Select your source "iTunes Library.xml" stored on your local drive that points to your lossey files and then choose the path to the destination xml file on your NAS. The transformation rules are now optional and you have more control over what playlists are included in the destination library file that is written to your NAS. A new feature also allows you to clear user related data in your library such as play counts and track ratings. This feature is useful if you want to copy your entire library to a partners PC and wish to clear the user based data so that they can start with a fresh library. The destination XML file can be imported into an empty iTunes library to create a full "iTunes Library.itl" file.

[\Quote]



Not usre I understand the above bit regarding but will play with things when I give it a go...really, at least for now, most interested in using iTLU to:



a) Add lossless songs to my lossless iTunes library that have been ripped by dBpoweramp



b) After a) above automatically i) convert the above added songs to lossy formats and ii) add said songs to my lossy iTune library...a *HUGE* added bonus would be the ability to carry over ratings in the conversion process from lossless to lossy.



c) After a) above automatically re-index my SONOS library









Under Edit setting you now have the option to minimize the application to the system tray at startup and to listen for the closure of iTunes. When listening for the closure of iTunes, notifcation messages will be displayed about the current status of the application and iTunes but these notification messages can be surpressed within the settings. It is best not to enable the system tray and iTunes listening functionality until you are happy with your configuration.





Got it...sounds (pun intended) good!









I won't be around tomorrow and boxing day but if you have any issues I'll aim to respond on Sunday. If you continue to have your earlier issue I will do my best to help you sort that out. If you have MSN we can chat online to work through your issues.



I recommend using the analyse library function for your destination library to check that all of your tracks are pointing to the lossless files. Also check the contents of the "Mapping Cache File" to see the one-to-one mappings between your lossey and lossless files. The Non Mapped tracks file is useful to find any source files where an equivalent destination file has not been found as a result of the transformation rules that you have defined.



I hope you enjoy the latest version of the app.



Have a great Christmas



Darren




Again, much thanks...hope you had a Merry Christmas and a good satrt to the new year...will connect with you over the next few days when I have a new CD to rip and have used the latest version...



Joel
Joel,





As far as the doubling up goes please note:



1. All my lossless files and all my compressed files are stored on my NAS drive BUT under two different shares (i.e. one share is called AppleLossless, the other share is called MP3).





Are you indexing both of these shares within Sonos and do you have separate "iTunes Library.xml" files under each share? If you are only indexing the AppleLossless share in Sonos what do you do about tracks that you only have in a compressed/lossey format? For the albums in AppleLossless format do you have all of the tracks in MP3 format under the MP3 share also? If both shares are indexed, Sonos will pick up both versions of the same track. For this reason my share on my NAS is simply called Sonos and only contains one file per track in the highest quality format available. I don't have different share names for different filetypes. Each track is also on my local PC in the compressed format (mainly mp3) for use with my iPod and these tracks are not indexed by Sonos.







2. I am certain that only one lossless track exists for each album, that only one lossless track appears in the SONOS library, etc.



3. Perhaps to be clearer I was using iTLU separately for the lossless and lossy libraries. That is:



a) I would rip the CD in AppleLossless to the AppleLossless share drive using dBpoweramp.



b) I would convert the AppleLoss files to the MP3 files on the MP3 share drive using dBpoweramp's batch converter



c) I would then use iTLU separately on each share to add the files to the iTune library but, in each of the shares, the files would be doubled (i.e. not physically doubled on the drive but doubled within iTunes because the resulting iTL after running the application listed each file/song twice).



d) Thus, I stopped using the application but am very happy to give the new version a go...I will simply make a copy of my iTL before running it.





I have never used ITLU (iTunes Library Updater I assume?) but you have answered one of my earlier questions. For a single track you have an MP3 version under your MP3 share and an AppleLossless version under your AppleLossless share. If you have MP3 downloads (with no Apple Lossless equivalent) I presume you are placing them in the MP3 share? If you are indexing both shares any tracks in both formats will be imported into Sonos twice regardless of whatever iTunes libraries you have in these shares. The Sonos indexer will index all tracks it finds rather than just the tracks defined within your iTunes libraries.



Do you have an Apple Lossless iTunes Library on your Apple Lossless share and an MP3 iTunes Library on your MP3 share? Are tracks that you only have in MP3 format in both shares and libraries?



It sounds like the ITLU application is adding both MP3 and AppleLossless copies of each track to the same library. Showing the Kind column within iTunes will confirm this.





Not usre I understand the above bit regarding but will play with things when I give it a go...really, at least for now, most interested in using iTLU to:



a) Add lossless songs to my lossless iTunes library that have been ripped by dBpoweramp



b) After a) above automatically i) convert the above added songs to lossy formats and ii) add said songs to my lossy iTune library...a *HUGE* added bonus would be the ability to carry over ratings in the conversion process from lossless to lossy.



c) After a) above automatically re-index my SONOS library





I can't advise on how to use ITLU as I'm not the author of that application and have never used it. I can advise on how to structure your music for use with my application however. I only have a single iTunes library for my lossey tracks (mainly mp3's stored on my local pc and not indexed by Sonos) and use my app to generate the "iTunes Library.xml" file pointing to the mainly lossless tracks on my Sonos share that are indexed.





Got it...sounds (pun intended) good!



Again, much thanks...hope you had a Merry Christmas and a good satrt to the new year...will connect with you over the next few days when I have a new CD to rip and have used the latest version...



Joel





I had a great Christmas thanks. I hope yours was good too and you had a great overseas trip. If you have MSN it would be good to chat on there to clear up your understanding of my application and my understanding of how your music is currently organised. I really should do a tutorial about structuring music for lossey and lossless setups. Essentially you need to keep the lossey and lossless files independent from each other and only index the lossless files + any tracks that you don't have in a lossless format. If you keep MP3's and your master lossey library pointing to those mp3's on a laptop those tracks and library are available on your travels. If you store the mp3's on your NAS they are not available when you leave the house.



In Summary my recommended approach is:

MP3 = Best for portability and ipods so store on your local pc/laptop and do not index in your Sonos system.



Apple Lossless = Best for use just when you are at home using your Sonos system so store on a NAS share along with any tracks that you do not have a lossless version of. Index only these tracks within your Sonos system and ensure that there is only one version of each track available to Sonos.



iTunes = Have one master iTunes library on your local PC pointing to the local MP3's, and use this library with your iPod.



Then use my app to repoint local mp3 links in your master lossey library to the same mp3's or higher quality equivalents on your nas share indexed by Sonos.



Keeping the folder structures the same on your local PC and NAS helps to keep the mapping rules simple.



Speak soon



Darren


Joel,







Are you indexing both of these shares within Sonos and do you have separate "iTunes Library.xml" files under each share? If you are only indexing the AppleLossless share in Sonos what do you do about tracks that you only have in a compressed/lossey format? For the albums in AppleLossless format do you have all of the tracks in MP3 format under the MP3 share also? If both shares are indexed, Sonos will pick up both versions of the same track. For this reason my share on my NAS is simply called Sonos and only contains one file per track in the highest quality format available. I don't have different share names for different filetypes. Each track is also on my local PC in the compressed format (mainly mp3) for use with my iPod and these tracks are not indexed by Sonos.





In response:



1. I have two shared drives -- 1 for lossless and 1 for lossy.



2. I am indexing only the lossless share drive for SONOS.



3. Each iTunes library has its own/separate iTunes library.xml files (i.e. both libraries are "complete and separate" and are identical in every way other than 1 is lossless and 1 is lossy).









I have never used ITLU (iTunes Library Updater I assume?) but you have answered one of my earlier questions. For a single track you have an MP3 version under your MP3 share and an AppleLossless version under your AppleLossless share. If you have MP3 downloads (with no Apple Lossless equivalent) I presume you are placing them in the MP3 share? If you are indexing both shares any tracks in both formats will be imported into Sonos twice regardless of whatever iTunes libraries you have in these shares. The Sonos indexer will index all tracks it finds rather than just the tracks defined within your iTunes libraries.





See my above response as this is *NOT* the case as I *DO NOT* download music in that I am a purist and i) purchase the CDs ii) rip the CDs in AppleLossless and iii) convert the AppleLossess to MP with the AppleLossless tracks being used for my SONOS and the MP3 tracks being used for my iPod.



Because I do manage my music in this manner both libraries -- even down to the playlists -- are identical in every way.









Do you have an Apple Lossless iTunes Library on your Apple Lossless share and an MP3 iTunes Library on your MP3 share? Are tracks that you only have in MP3 format in both shares and libraries?





See my above response...









It sounds like the ITLU application is adding both MP3 and AppleLossless copies of each track to the same library. Showing the Kind column within iTunes will confirm this.





Quite possibly but this would surpirse me as i) the AppleLossless and MP3 files are on separate shares and ii) more importantly, I never connect to both shares when running ITLU so how could it possibly grab both.



With that, it is also important to note that the doubling up occurs in the iTunes library which is then carried over to the SONOS...I need to stop the doubling up in the iTunes library and then all will be grand.









I can't advise on how to use ITLU as I'm not the author of that application and have never used it. I can advise on how to structure your music for use with my application however.





Understood.









I only have a single iTunes library for my lossey tracks (mainly mp3's stored on my local pc and not indexed by Sonos) and use my app to generate the "iTunes Library.xml" file pointing to the mainly lossless tracks on my Sonos share that are indexed.





Now that you know how *BOTH* my loseless and lossy tracks are organized any and all advice would be greatly appreciated.









I had a great Christmas thanks. I hope yours was good too and you had a great overseas trip.







Good to hear and thank you...









If you have MSN it would be good to chat on there to clear up your understanding of my application and my understanding of how your music is currently organised. I really should do a tutorial about structuring music for lossey and lossless setups. Essentially you need to keep the lossey and lossless files independent from each other and only index the lossless files + any tracks that you don't have in a lossless format. If you keep MP3's and your master lossey library pointing to those mp3's on a laptop those tracks and library are available on your travels. If you store the mp3's on your NAS they are not available when you leave the house.





No MSN but can create an account should that be of assistance...that said, part of me thinks it better to continue in this manner so that all can benefit.



Regarding the structuring of my lossless and lossy iTunes libraries -- per my above responses and unless I am missing something, which is possible -- I believe that I have thinsg structured as you suggest; taht is:



1. Lossless and lossy are physically separate.



2. Lossless and lossy have separate iTunes library.xml files



3. Lossless and lossy are identical



4. SONOS indexing *DOES NOT* currently result induplicates because -- per 1. 2. and 3. above -- they are so structure with SONOS only pointing to the lossless share.







In Summary my recommended approach is:

MP3 = Best for portability and ipods so store on your local pc/laptop and do not index in your Sonos system.



Apple Lossless = Best for use just when you are at home using your Sonos system so store on a NAS share along with any tracks that you do not have a lossless version of. Index only these tracks within your Sonos system and ensure that there is only one version of each track available to Sonos.



iTunes = Have one master iTunes library on your local PC pointing to the local MP3's, and use this library with your iPod.



Then use my app to repoint local mp3 links in your master lossey library to the same mp3's or higher quality equivalents on your nas share indexed by Sonos.



Keeping the folder structures the same on your local PC and NAS helps to keep the mapping rules simple.



Speak soon



Darren




Noted; that said, given that I have two separate libraries with two separate iTune library.XML files there is -- again, unless I am missing something -- little/no purpose for me to use your application at this point as I do not have the need to "REPOINT" iTunes library.xml links from the MP3 share to the AppleLossless share...am I missing something?



Again, much thanks.





Joel
Joel,



Thanks for your detailed explanation of your setup. It has helped a lot.



Please can you explain exactly what you mean by "doubled the albums in iTunes". If you actually go into iTunes and type the album name in the search bar at the top do you see the list of tracks but each track doubled up? If this is the case, this has nothing to do with my application. Right click on the track details header within iTunes and tick the Kind option to see the file type for each track. Also you can right click on each doubled up track and choose get info to view the path to each track.



If you have a playlist for an album in iTunes and it is the playlist that appears twice within Sonos, I think I know what the problem may be. Check your appless Lossless share where your iTunes files are stored and make sure there are not multiple XML files. If you are writting the destination library xml file to the Apple Losless share the Sonos indexer will pick up both the orginal iTunes XML file and also the modified file written to your NAS by my application. My application currently prevents the source and destination library paths from being the same to prevent the original iTunes XML file from being overwritten. An enhancement to my application maybe to allow the paths to be the same, but to rename the original (source) XML file to "iTunes Library Original yyyymmddhhmmss.xml.bak" for example before the destination XML file is written to the same path as the original XML file. The Sonos indexer will not pick up the .bak file as it is only looking for iTunes XML files with the .xml extension. I do not have the problem of multiple XML files being on my Sonos share because my MP3 library (and all of the track files) are stored on my local PC. Only the XML file (destination file) pointing to my lossless tracks is stored (written by my app) to my Sonos share. If you have the source and destination iTunes Library.xml files in your appless lossless share move the original file created by iTunes to your desktop and then re-index. The Sonos indexer will then only find the XML file created by my application. It is safe to move the original XML file as iTunes will recreate it next time iTunes is opened and re-closed. The xml file is essentially created by iTunes from the master iTunes .itl file in the same directory as the xml file.



Another thought regarding the XML file. At some point iTunes changed the filename of the XML file from "iTunes Music Library.xml" to "iTunes Library.xml". I have heard reports that when this happened the original "iTunes Music Library.xml" file was left in place so that 2 xml files were found by the Sonos indexer. This also results in a doubling up of playlists. If you have both files it is safe to remove the original "iTunes Music Library.xml". It should have an old modified date.



I hope all of the above helps.



Darren


Joel,



Thanks for your detailed explanation of your setup. It has helped a lot.





Good, that was the point as I wanted us to be in the same page.









Please can you explain exactly what you mean by "doubled the albums in iTunes". If you actually go into iTunes and type the album name in the search bar at the top do you see the list of tracks but each track doubled up?





Correct, this happened a couple of times but I have since fixed this through a very painful and time consuming manual process...now, before I do anything on/to the iTunes library i ALWAYS back everything up...









If this is the case, this has nothing to do with my application. Right click on the track details header within iTunes and tick the Kind option to see the file type for each track. Also you can right click on each doubled up track and choose get info to view the path to each track.





Agreed...all were the same file type.









If you have a playlist for an album in iTunes and it is the playlist that appears twice within Sonos, I think I know what the problem may be. Check your appless Lossless share where your iTunes files are stored and make sure there are not multiple XML files. If you are writting the destination library xml file to the Apple Losless share the Sonos indexer will pick up both the orginal iTunes XML file and also the modified file written to your NAS by my application.





Agreed...this is not the case and also why all old iTunes libraries have had their extension changed to OLD so that they are NOT picked up and thus duplicated.







My application currently prevents the source and destination library paths from being the same to prevent the original iTunes XML file from being overwritten. An enhancement to my application maybe to allow the paths to be the same, but to rename the original (source) XML file to "iTunes Library Original yyyymmddhhmmss.xml.bak" for example before the destination XML file is written to the same path as the original XML file. The Sonos indexer will not pick up the .bak file as it is only looking for iTunes XML files with the .xml extension.





Great minds think alike. ;)









I do not have the problem of multiple XML files being on my Sonos share because my MP3 library (and all of the track files) are stored on my local PC. Only the XML file (destination file) pointing to my lossless tracks is stored (written by my app) to my Sonos share. If you have the source and destination iTunes Library.xml files in your appless lossless share move the original file created by iTunes to your desktop and then re-index. The Sonos indexer will then only find the XML file created by my application. It is safe to move the original XML file as iTunes will recreate it next time iTunes is opened and re-closed. The xml file is essentially created by iTunes from the master iTunes .itl file in the same directory as the xml file.





Agreed...see my responses above...









Another thought regarding the XML file. At some point iTunes changed the filename of the XML file from "iTunes Music Library.xml" to "iTunes Library.xml". I have heard reports that when this happened the original "iTunes Music Library.xml" file was left in place so that 2 xml files were found by the Sonos indexer. This also results in a doubling up of playlists. If you have both files it is safe to remove the original "iTunes Music Library.xml". It should have an old modified date.





Noted and will be checked but that said, likely not the case because the problem was a doubling up in iTunes itself which, of course, resulted in a doubling up in SONOS...









I hope all of the above helps.



Darren




It does and thanks...





Joel
Joel,



In response to the following:





Noted and will be checked but that said, likely not the case because the problem was a doubling up in iTunes itself which, of course, resulted in a doubling up in SONOS...





Do you have any tracks still in your iTunes library that are still doubled up?

I appreciate your agreement that it is not my application that is doing this. If you have any duplicates still, right click on each track in iTunes and choose Get Info. Take a look at the first tab for each track and note the path to each track. I am 99% confident they will be different paths. I have tried adding the same file to my iTunes library multiple times by dragging the file into my library. iTunes doesn't report any errors but simply ignores the file if it is already in the library. I therefore supect the duplicates are two different files. The fact that the tracks also appear twice in your Sonos library also points to two physical files for the same track existing in your share. One thing you could do is try renaming one of Apple Lossless files on your NAS share that is appearing twice in your Sonos index (and then don't reindex). If you try playing both tracks one may play and the other may report a missing file.



A note to Sonos. I don't think there is a function for finding out the path to a track file within the index. This feature is a must. Please add it or correct me if I have not seen this feature. Your should be able to right click on a track within the Sonos desktop controller and do a 'Get Info' just like in iTunes. The Get Info screen should show all the index information about the track and the path to the track that Sonos is using to play the file.



One way of getting the same physical file into your iTunes library twice, would be to add it in from the network path as well as from a mapped drive path. iTunes is likely to consider \\nas\AppleLossless\Track1.m4a and S:\Track1.m4a as two different files (where S is mapped to your \\nas\AppleLossless share). You should take care to ensure you always add tracks to iTunes from the same path. I recommend adding the tracks from a mapped network drive mapped to your \\nas\AppleLossless share.



You could also use my application to investigate the issue. If you use the Analyse Library function for the source library path and double click on the count of m4a files found you will see a list of all of the paths to your tracks. If you see a mixture of different path types that is your problem.



That's my brain dump over. I hope that helps.



Darren