Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: sort playlist by file name #2178

Open
ghost opened this issue Aug 16, 2020 · 4 comments
Open

feature request: sort playlist by file name #2178

ghost opened this issue Aug 16, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Aug 16, 2020

Hi

Would it'be possible to add sort playlist by file name?
I ask this to be able to play a zip file that's been added to a new playlist in the order of the file names alphabetically inside the zip file.
This is currently not possible as playlists as re-sorted by title, author or duration and as a consequence we can't use the alphabetical file name order in the zip file.

I use mostly zip files from MAME's vgmplay archive, which are zipped vgz or vgm files archives.
The file names represent the order of the music used in the specific game, for example: first the intro song, then the main menu song, then level 1, then level 2, ...
Mostly the file name start with 01, 02, 03, ... and then the title of the song.
This order of the files would be nice to have when 'sort by file name' is added.

thx in advance!

@vitamin-caig
Copy link
Owner

Assume we have tracks with the next paths (explanation follows):

file:/sdcard/Music/1.vgm (just vgm file in folder)
file:/sdcard/Music/music.zip?2.vgm (vgm file in zip archive)
file:/sdcard/Music/music.zip?3.vgz/+unGZIP (vgz (i.e. gzipped vgm) in archive)
file:/sdcard/Music/music.zip?4.sid/#2 (subtrack of zipped sid file)

What filenames that tracks should have? And where should they be displayed in playlist?

@ghost
Copy link
Author

ghost commented Aug 16, 2020

Hi

file names:

1.vgm
2.vgm
3.vgz
The last one I don't understand

So it puts all those together in the playlist and sorts them by alphabet. Since they start with a number, the order above is correct
Only if you play them, you can see in the full path below spectrum analyser from which archive they belong, because playlist doezn't display that

@ghost
Copy link
Author

ghost commented Aug 17, 2020

Or you could first sort on zip file name and then sort all file names inside that zip file.

So if you have a.zip and b.zip, first all files in a.zip are sorted and added to'the playlist, then the same for b.zip

I think this is even better because then similar files belonging to a zip file are not 'taken apart' by the sorting. It sorts inside the zip file after sorting the zip file names themselves.
You like this idea?

So for your example it's the same as above.
1.vgm is not in a zip file so comes first.

2.vgm and 3.vgz are both inside music.zip but '2' comes before '3'

If a.zip would exist too, this would be sorted before music.zip's files but after 1.vgm because that file is not inside a zip file.

@vitamin-caig
Copy link
Owner

Logic should be as simple as possible and currently it's not clear even for you how to determine filename to sort on. So, no any 'by zip name then by file name inside etc'. Assume you have only 'location' string shown in main panel, so you can operate with its components to extract filename and then compare.

What the problem with understanding the 4th case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant