Automatically generate playlists for folders

I’ve seen many requests in other threads for folder browsing and playing. I too would like that feature, partly because I’m already used to it (my previous crappy player didn’t support playlists :stuck_out_tongue: ).

While I can’t make the Clip browse its folders, I wrote a Python script that automatically creates playlists based on the directory structure of the Music folder. It turned out to be rather nice and I’m quite happy with it.

I don’t know if there’s a tool or media player that can easily do this already. Would anyone be interested in such a program? It should be fairly easy for me to write a little Windows program (since not many of you might have Python installed).

Let me know what you think.

–Elias

You are a GENIUS ! ! !

So how do I get a copy of the script?

Russ@russwill.com (grin)

Thanks in advance ! ! !

Playlist script, what a smarty!

Here are the links to the program and its source code (C++, VS2008). They will expire in 1 week, but I’ll try to put up a little page somewhere by then.

AutoM3U v1.0
source

[Edit:] Forgot to say this is for Windows 2000 or higher.

Message Edited by eliasf on 10-27-2008 11:07 PM

I’m curious to know how many folders deep (from the root menu), can the Sansa read? Any sansa-gurus <ahem!> would care to chime in on this?? Or is there already a thread somewhere that someone can point me too?

@webspin_r6 wrote:
I’m curious to know how many folders deep (from the root menu), can the Sansa read?

Well, the filesystem is FAT32, so the only limitation is that the total path size (letters and slashes in “X:\folder1\folder2.…” ) must be less than 260. In fact I just created a long sequence of subfolders like this: F:\1\2\3\4.…\83 (83 levels deep). Navigating past 15 or so level gets too slow in Explorer though. I managed to copy a song down to 25 levels, made a playlist out of it and it worked without exploding… :stuck_out_tongue:

Message Edited by eliasf on 10-27-2008 11:47 PM

Elias,

Great job,  script works as designed.  

SansaFix

ah ■■■■. I get a runtime error of “The application has failed to start because its side-by-side configuration is incorrect”

Really, just a Python script would be fine…

Thanks!

@russwill wrote:

ah ■■■■. I get a runtime error of “The application has failed to start because its side-by-side configuration is incorrect”

 

Really, just a Python script would be fine…

 

Thanks!

You probably need the Visual C++ 2008 runtime. It’s a small download (1.7 MB).

I will also upload the Python script in a while. I just need to polish it up a bit… :wink:

Thanks Elias, it’s a great tool. Works fine for me.

An improvement I would love to have is the possibilty to include the parent folder’s name  of the current folder in the playlist name. This would allowed to have, for example, Album and Artist in the playlist title.

I don’t know anything in Python. So if you could implement that option, I would be very grateful.

Thanks again

@benhazouz wrote:

An improvement I would love to have is the possibilty to include the parent folder’s name  of the current folder in the playlist name. This would allowed to have, for example, Album and Artist in the playlist title.

Thanks, that’s a nice idea. Will be added soon.

I’ll just wait for a while, in case there are more suggestions, so that I can add them all together.

Great!

Then I have another one :wink: : I noticed that tracks are sorted alphabetically in the playlist. It would be nice to have an option to sort them by ID3 track number, for example, for those who don’t have the track number at the beginning of their filenames. I don’t know if it can be implemented easily.

@benhazouz wrote:

It would be nice to have an option to sort them by ID3 track number, for example, for those who don’t have the track number at the beginning of their filenames. I don’t know if it can be implemented easily.

Yes, that would be very useful. There are some open-source ID3 tag libraries I could use. It might take a bit longer though… :stuck_out_tongue:

Great tool!

But I have two problems:

I) it can`t use international names like “áñÉíÓúÑ.mp3” It’s simply empty in the playlist.

II) some tracks are not in order. Example:

#EXTM3U
#GENERATOR:AutoM3U
Danko Jones\Never Too Loud\03 Still in the high school.mp3
Danko Jones\Never Too Loud\07 Forest for the trees.mp3
Danko Jones\Never Too Loud\01 Code of the road.mp3
Danko Jones\Never Too Loud\02 City streets.mp3
Danko Jones\Never Too Loud\04 Take me home.mp3
Danko Jones\Never Too Loud\05 Let’s get undressed.mp3
Danko Jones\Never Too Loud\06 King of magazines.mp3
Danko Jones\Never Too Loud\08 Your tears my smile.mp3
Danko Jones\Never Too Loud\09 Something better.mp3
Danko Jones\Never Too Loud\10 Ravenous.mp3
Danko Jones\Never Too Loud\11 Never too loud.mp3
Danko Jones\Never Too Loud\12 You ruin the day.mp3
Danko Jones\Never Too Loud\13 Sugar high.mp3

@buginside wrote:

But I have two problems:

I) it can`t use international names like “áñÉíÓúÑ.mp3” It’s simply empty in the playlist.

II) some tracks are not in order. 

Noted! Both will be fixed in the next version. Thanks.

looking foward to the fix with the id3 tag tracks as all of the playlists it created are out of order but awsome job eliasf keep it up :slight_smile:

*note

also the ability to add a prefix to the playlist for example lets say you want each playlist to be named 00 - [album].m3u that would be awsome. my directory structure is [artist] - [album]

Message Edited by RadiatedAnt on 10-28-2008 07:46 PM

Version 1.1 is out :smiley:

AutoM3U v1.1 (.zip; 196 KiB) + source code (.zip; 358 KiB)

If the above links have expired, PM me and I’ll update them.

 

What’s new:

  • Added M3U8 support.
  • Added several variants of M3U (Latin1, ACP, ASCII) and codepage conversion error reporting.
  • Added playlist name format option (based on parent folders).
  • Added song ordering (based on file attributes and tags).
  • Folder edit boxes now accept dropped folders.

Note that the Clip supports M3U8 playlists just fine and you should use this format. If, for some reason, you want to use M3U, make sure you select the “M3U (ASCII)” format (the Clip only supports 7-bit US-ASCII characters in M3U playlists).

For the next version I’m thinking about adding some sort of playlist editor and a function to automatically check and fix the playlist entry paths. Any more suggestions are welcome.

Message Edited by eliasf on 12-11-2008 03:04 PM

WOW!

This is the tool I was waiting for! Thanks 

Man, you did a great job!

This new version is almost perfect. :wink:

Here is a small possible improvement, but no big deal: it could be nice to have the optionto save the playlist in the tracks parent folder.

For sure I will use you tool and talk about it.

File has expired The file you are trying to download has expired and is no longer available. ! can u send me this into my email ? my email is dorbss@gmail.com

I’ve sent you the program, Dorsss, and updated the links in my post.