Ottodix / Eole-foobar-theme

Eole blows gently into your ear his nicest melodies.
1.29k stars 85 forks source link

Custom Sorting Order in Playlists #259

Closed AlbertM94 closed 4 months ago

AlbertM94 commented 1 year ago

I really like this theme, but I noticed that in the playlist, there's only a fixed set of sort orders (Artist, Album, Shortest to Longest, Randomize, etc.). Maybe it's just me, but I used to sort my playlists by %last_modified% so that I can always see the latest song I added.

I also noticed that in the Library view, there's a "Custom titleformat" option in "Sort by" menu, which works if I use %last_modified%. However, in this view I cannot switch from the grid view to simple playlist style. So I wonder is there anyway I can customize sort order in Playlists view as well? Maybe add the same custom option as in the Library view?

P.S. I'm not a professional programmer, but I tried to see if there's any hint in the js files. I found that in the \themes\eole\js\WSHsmoothplaylist_trackinfos.js file, the menu items are defined as well as the code for each sort order (e.g., line 4239 plman.SortByFormatV2(g_active_playlist,sort_by_title,1); However, I was unable to find the definition of the sort patterns like sort_by_title, and when I try to replace one of them with something like sort_by_last_modified, the syntax was not recognized and will throw an error when I try to sort that way. Could I change the syntax somehow to make it work?

Again, I really like this theme and want it to be perfect personally, so any help is appreciated.

JadeTank commented 4 months ago

A custom playlist sorting order has been added in #289