Workaround for large music collection!


Userlevel 2
Badge
Hello everyone, I just finished a little utility for making a workaround for getting Sonos to be able to index large music collections.
This workaround will only be usable with the Folders view in the controllers though.

The key point is letting Sonos index a folder structure with m3u files instead of the actual music files.
This together with a program that can automatically create a copy of the music collection folder structure and fill it with m3u files(with complete(and possible shifted) file paths.), mimicking the actual collection.

Sonos will still only be able to index 65000 m3u-files but since each m3u-file will contain the contents of each folder listed(which usually means 1 folder per album) the limit will approximately be pushed up with a factor 10-15(number of songs on a standard album)


More info and the beta(only tested on XP) of M3U4U is found on www.anderware.org

cheers,
Anders Forslund

157 replies

Userlevel 1
Badge
Hi Anders,

VERY NICE application!

I do however have a problem.

M3U file structure created as described - i.e. a line in a the m3u file reads

D:\shares\Music\Sonos - Rockabilly flac\1910 Fruitgum Company\Best Of\01 - Simon Says.flac

Sonos indexed the M3U file structure. I can browse the structure - but I cannot play any music. Sonos reports:

Unable to play the file 01 - Simon Says.flac - the file //HPSERVER/M3U/01 - Simon Says.flac cannot be found

(HPSERVER is D:)


Seems in Sonos all file structure reference after main folder M3U is lost - even if I can browse the full structure.

Any thoughts on this?

Pres.
Userlevel 1
Badge
Used the Location Shift function to state \\HPSERVER\shares\Music.........

Again M3U tree structure is built to perfection.

Sonos indexes.

Now when trying to play music I get an "Access denied to \\HPSERVER\shares" message.

Anyone?

Pres.
Userlevel 2
Badge
Ratty is absolutely correct, the m3u-share must have proper access rights set to it in order for Sonos to be able to read them(this is of course no different than the normal share used).
AFAICR it was resolved by allowing 'guest' read access to all shares, and not specifying username/password for the shares in Sonos library setup.
Right, the Sonos player reads the file path from the m3u but does not know what username or password to access that location with. It could use the same as the indexing share but it does not try that either.

If I remember correctly, Sonos requires a "true" share as well, meaning that Sonos has some problems with indexing subfolders below the starting share level, ie if the actual share is \\192.168.0.1\music_share, trying index \\192.168.0.1\music_share\m3u will not always work. A new share would be need to be made like \\192.168.0.1\music_m3u_share which publishes the m3u folder as the base share. This works differently on different NAS:es.

And also, as he states, the mapped drive in Windows is not a valid path for Sonos - that is what the "Location Shift" is used for.
It can be a bit tricky to determine the correct location shift that is valid for the individual system to be used. Sometimes it is easier to use the IP-adress of the server with the share instead of its name, ie \\192.168.0.1\music_share etc
Userlevel 2
Badge
Now, if we only could persuade Sonos to implement the option to select what file types the indexing service indexes, it would be easy to just index m3u-files and let the program create m3u-files on in the actual, local music share and by this way the access rights would work directly!

This workaround has its issues, mainly security related things like, "Do I want to give the guest account read access to all my music without any password protection?"
If only m3u-files was indexed this would not be a problem, all files would be password secured and accessible by Sonos!

Taking it a step further, maybe the Sonos indexing service could create the m3u-files itself!

I suggested this in Sound Ideas(http://forums.sonos.com/showthread.php?p=99126#post99126)
All sounds very similar to ID3Browse. This is a tool to create m3u files in folder structures to allow for multiple browse hierarchies in file-based music players. It is extremely flexible in its structure, but only allows for a mp3 library. It is available in source code, so maybe a lot of inspiration can be gotten from what this tool already does.
All sounds very similar to ID3Browse.
ID3Browse has to dig in the tags whereas Anders' utility has the benefit of simply working with directory/file names and is format-agnostic. In this case I think I'd go with Occam's razor. 🙂
Userlevel 2
Badge
And since Sonos only support basic m3u(which only can contain path/filename) and not extended m3u(which can contain tag information as well), there is no point in getting tag data from the media files. The generating process can take a lot of time anyways(we are talking about a lot of files to index) and would increase a lot if the process has to open each file for getting tag data as well.
Userlevel 1
Badge
Thanks a bunch.

Also asked Sonos support.

The solution was to allow the guest account access through the Windows Home Server control window!

I now have access to my "normally" indexed collection - and even all the rest by the help of this workaround.

Pres.
Userlevel 2
Thank you so much! I am so happy to finally have access to all of my music. This is fantastic.

If you don't mind a feature request...

It would be really useful (for people like me who have individual album folders inside of artist folders) if M3U4U could have an option to write the m3u files one level above the location of the (original) mp3 files. This would save people from having to click through an extra folder level to get to the album they want to play. (Hope this make sense.)

Did I mention how happy I am?

Kevin
Userlevel 2
Badge
Thank you so much! I am so happy to finally have access to all of my music. This is fantastic.

If you don't mind a feature request...

It would be really useful (for people like me who have individual album folders inside of artist folders) if M3U4U could have an option to write the m3u files one level above the location of the (original) mp3 files. This would save people from having to click through an extra folder level to get to the album they want to play. (Hope this make sense.)

Did I mention how happy I am?

Kevin


Happy to be of service!
Now, regarding your request. It´s a good one!
Unfortunately it is somewhat more complicated to implement(I know, it sound simple but there are some factors that needs to be considered)

I´ll see if I can make it happen.
Userlevel 2
Badge

It would be really useful (for people like me who have individual album folders inside of artist folders) if M3U4U could have an option to write the m3u files one level above the location of the (original) mp3 files. This would save people from having to click through an extra folder level to get to the album they want to play. (Hope this make sense.)



I´ll see if I can make it happen.

Something happened!
I just uploaded an experimental beta of M3U4U with the feature to create the mirror m3u-files one level higher.


Update:
New version that can remove empty folders from the mirror structure as well.
Userlevel 2
Something happened!
I just uploaded an experimental beta of M3U4U with the feature to create the mirror m3u-files one level higher.


Update:
New version that can remove empty folders from the mirror structure as well.


Hi Anders,

thanks A LOT for the new features - that's EXACTLY what I needed. In the past I used the tool "swaxM3U" to create my m3u playlists to be used in Sonos, but it was a lot work because you have to do a lot manually (because it can't write the playlists with the folder structures when you want the playlists placed not in the folders where the music files are stored).

Now M3U4U is my favourite tool, because I can create all the playlists with one click!

Thanks again!

DrFink
Userlevel 2
@ first ... Sorry for my bad English :p

I have a Problem, when i use the Tool on a Network Drive ... The MU3 is not sorted by track number..

\\server\music\4.mp3
\\server\music\1.mp3
\\server\music\3.mp3
\\server\music\2.mp3

and not

\\server\music\1.mp3
\\server\music\2.mp3
\\server\music\3.mp3
\\server\music\4.mp3

When I test it on a Local Harddisk with the same Files ... than the Tool make a Fantastic Job ...

Is it a Bug in the Tool or I'am the BUG ?*gg*
Userlevel 2
First, thanks so much for this new feature. It's just what I'd hoped for!

:)

Second, I hate to complain, but I'm experiencing the same issue as stylaz. My playlists are out of order, also using a network drive (ReadyNAS NV+).

Most of them seem to be in the order 02, 03, 04, 05, 06, 01 (i.e., track one is last), but some seem to be in arbitrary order.

-Kevin
Userlevel 2
Badge
About the order problem, I am guessing that the SMB-service on the NAS returns the files in that order.
I am out of town right now so I can not look deeper into the matter but I am guessing that if you map the network drive to a drive letter and use that as source with Location Shift (to replace the x:\ with \\NAS etc), it would be ordered correctly.
Try that and I will check on it in a couple of days.
/Anders
Userlevel 2
Both Ways makes the MU3 out of Order...

I think it is a Problem of the SMB Service ...:rolleyes:
Both Ways makes the MU3 out of Order...

I think it is a Problem of the SMB Service ...:rolleyes:

In a recursive folder scan, SMB can evidently return files in any order. When indexing a Sonos library if files share identical tags then one can't predict which file will be indexed.
Userlevel 2
Badge
Regardless the SMB-thingy, a little sort feature added is all that is needed. I will make an updated version that fixes this when I get back home.
Userlevel 2
Very Nice ... 🙂 THX a Lot 🙂
Userlevel 2
First, thanks so much for this new feature. It's just what I'd hoped for!

:)

Second, I hate to complain, but I'm experiencing the same issue as stylaz. My playlists are out of order, also using a network drive (ReadyNAS NV+).

Most of them seem to be in the order 02, 03, 04, 05, 06, 01 (i.e., track one is last), but some seem to be in arbitrary order.

-Kevin


Hmm, I have all my music files on a Windows Home Server (also access by SMB) - and I don't have this problem. But I created all the m3u-files on my local XP machines, and then copied them to my WHS.
Userlevel 2
Yes ... on Local no problem ... only on Network Drive created mu3 .... I use Linux as my Storage ... and i don''t have the Files Local ... ;-)

But with the next update my problem will be fixed 🙂
Userlevel 2
Badge
New updated version available on M3U4U

Added features
- sort the entries in the resulting M3U-file(I found when digging into my own files the same out-of-order sorting problem on a couple of the m3u:s. Not all but here and there so I recommend enabling this feature if you havent verified your collection)
- clearing the target mirror folder before creation

/Anders
Userlevel 2
Now it is my Favorite Tool ... Now i can scan my Network Drive without any Issue :-)

Thx's for this very little & Useful Tool 🙂
Userlevel 2
Dear Anders,

first of all thank you for that wonderful tool... its exactly what i´ve been looking for.
anyway i have a strange problem with some of my mp3-folders which I dont quite understand.

while writing the playlists, it suddenly stops and says "Error in generating filelist!
File not found - Do you want to continue with the next folder?"

the folder its complaining about is fine - i´ve checked the files - even renaming the mp3s to avoid maybe unallowed symbols. -
when i click in the programm on "yes" - that i want to continue with the next folder - it crashes at the next problem-folder - with a "run-time error "53" File not found" message....

Anybody experienced that problem?

normally i would just erase the problem folder, but it happens quite often.

greetings
Franz
Userlevel 2
Franz,

I've had a similar (or same?) problem with two circumstances: 1. "Foreign" characters (in my case Japanese, or an accented character, e.g., café) and 2. Files that were locked by Windows (not necessarily audio files).

I've worked around this by: 1. rename files (tedious) or 2. copying the files locally, deleting the files from the server, and copying the files back.

Hope this helps.

Kevin

Reply

    Cookie policy

    We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

    Accept cookies Cookie settings