Posts: 81
Threads: 14
Joined: Apr 2018
Reputation:
5
Is there a logic to the display order of playlists in the browse panel?
It doesn't appear to be alphabetical or by modification time. I can't see a logic to it.
It is the same order given by mpc lsplaylists so it is probably a MPD thing rather than a moOde thing but I wondered if anybody here has an idea how it works?
Posts: 247
Threads: 15
Joined: Apr 2018
Reputation:
10
I'd love to be able to sort listings into date, reverse date order, or alphabetical order in the browse panel
Posts: 39
Threads: 2
Joined: Apr 2018
Reputation:
2
The order is given by the natural directory order as can be seen by:
ls -lU
/var/lib/mpd/playlists/
As far as I know that can not be rearranged easily. For FAT filesystem there is a utility fatsort. See for example:
https://superuser.com/questions/368623/h...ed-in-ls-u
Additionally see last post in:
https://serverfault.com/questions/406229...g-in-linux
Quote:
Modern Linux (ext4) adds a B-tree index for file lists. One of his effect is default files order depends on a hash of their names.
To disable this feature use :
Quote:tune2fs -O^dir_index
But I don't know, what this really does. Perhaps someone knows.
Regards
Duke.g
1x RPi 3B, 1x RPi 4, 1x RPi 5, Moode 9; 6k flac Songs; 180k MP3 Songs; Asset-UpnP 186k Songs
The blues has got a hold of me, I believe I'm gettin' dizzy - ZZ Top
Posts: 39
Threads: 2
Joined: Apr 2018
Reputation:
2
Well I just made a copy of my SD-Card and tried it.
The playlist are now alphabetically ordered and for me it makes no performance difference while using the (small) local library of my player. Small means:
Artists: 873
Albums: 856
Songs: 4301
You first have to find out your device: I used lsblk
Output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
sda1 8:1 0 238.5G 0 part /media/M_MUSIC
mmcblk0 179:0 0 14.9G 0 disk
mmcblk0p1 179:1 0 43.2M 0 part /boot
mmcblk0p2 179:2 0 14.4G 0 part / -> This is my SD-Card where the playlists reside!
I issued: sudo tune2fs -O ^dir_index /dev/mmcblk0p2
Then I rebooted. After that the playlists are in the "correct" order.
Regards
Duke.g
1x RPi 3B, 1x RPi 4, 1x RPi 5, Moode 9; 6k flac Songs; 180k MP3 Songs; Asset-UpnP 186k Songs
The blues has got a hold of me, I believe I'm gettin' dizzy - ZZ Top
Posts: 13,489
Threads: 305
Joined: Mar 2018
Reputation:
545
Thats cool but probably not necessary once the sorts are done in code.
The advantage of using PHP/JS code and array sorting is:
1. Directories can easily be separated from files
2. The removeArticles() and ToLowerCase() functions can be used to yield an optimal sort
3. Additional array elements can be added to produce any sort order
-Tim