souch / SMP

SicMu Player for android
GNU General Public License v3.0
29 stars 8 forks source link

Songs could be sorted inside each folder #19

Closed jpellegrini closed 7 years ago

jpellegrini commented 8 years ago

Hello!

I have a suggestion for SicMu.

In tree view, songs show up in some non-natural order (whatever the filesystem returns to SicMu when it asks for the files). It would be interesting to sort the audio files, so I could rename files like

01_one-song.mp3
02_another-song.mp3
03_one-more-song.mp3
.
.
.

etc, and I would then see all songs in the order I want.

I wouldn't really want a playlist-building feature... Just ordering the songs like that would already be great.

souch commented 8 years ago

Hi!

In tree view, songs are not really in non-natural order. The code of how songs are ordered is in initByTree function in Rows.java file. Inside a same folder, songs are sorted in this order (using audio files metadata): artist / album / track number .

So inside a same folder, you would like to replace this ordering by filenames number prefix ?

jpellegrini commented 8 years ago

Hi!

I think I did not express myself properly. I use "sort by tree", since it's natural for me. Then the files in each directory are shown in some order that does not feel natural. For example, suppose that in the folder aaa/bbb/ccc, I had the files

first-song.mp3
second-song.mp3
third-song.mp3
fourth-song.mp3

If I opened the ccc directory in SicMu (using "sort by tree"), the files would not be listed in that order. Since I want them to be played in that exact order, I actually renamed them before transferring to the phone, so their names are:

01-first-song.mp3
02-second-song.mp3
03-third-song.mp3
04-fourth-song.mp3

Some players will folllow ASCII (or Unicode) order, so the songs are listed and played in the order I want.

But SicMu does not do that -- the songs show up in some other order like

03-third-song.mp3
01-first-song.mp3
04-fourth-song.mp3
02-second-song.mp3

Maybe this is Unix atime or ctime order, I don't know. But it would be nicer if, inside each directory, songs were sorted using some other method -- for example, using ICU (see this answer to a Stackoverflow question. Then SicMu would show files in "alphabetical order", whatever that means for the locale being used, and, if I want to sort the songs in a particular order, I just need to prefix them with numbers, as I mentioned above.

souch commented 8 years ago

I think I understand what you mean.

Did you check if your files have their metada filled? If they are filled, the order must correspond to the metadata artist/album/track number and not atime or whatever.

To have the order you want, you can edit the metadata rather than the file name.

I can change the filter like this: artist/album/track number/filename but if there is metadata they will be preponderant to the filename. I like the fact that inside a folder it sorts by metadata.

souch commented 7 years ago

Ok, I ran it your problem (metadata not filled :-( ), and so I fixed it :-). Sorry for not taken into account your request, the fix was a piece of cake.