Help - Search - Members - Calendar
Full Version: PanelsUI: Sort/Group by Standards
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
FofR
For those not in the know, PanelsUI from version 0.9 upwards sports a powerful grouping/sorting configuration. A discussion about whether to include these settings in a distributable PUI is ongoing in the Panels development thread, so lets keep that out of here.

At the moment they are not which makes developing "sort by" standards a crucial issue, should we want layout designs to function across multiple fb2k installations without hassle. If everyone has the same standard sort by/group functions and default presets upon installation things will stay smooth.

The aim here then is to create a) A set of sorting and grouping criteria that the majority can abide by b) A set of default presets that use these criteria.

I'll update this first post with the relevant information.
FofR
Second post, so as not to confuse my opinions with the standards decided (which I will put in that post).

The sort by criteria I currently use are as follows:

Album (this is the default that comes with pUI 0.9+)

CODE

Primary sort: $if(%single%,!single,%album%)
Secondary sort: %discnumber% %tracknumber% %title%
Group by: empty


Artist

Primary sort - uses $upper(%artist%) so that case sensitivity is ignored.
CODE


$if($get(artist),,$put(artist,$upper(%artist%)))

$if($stricmp($get(artist),various),
    !various %album%
,
    $get(artist)
)


Secondary:
CODE
%date% %title%


Tracknumber - Note: different to title. I feel sorting by title should sort alphabetically by title name.
Primary Sort:
CODE
%discnumber% %tracknumber%


Folder/Path - I have found this particularly helpful in grouping mp3s with erroneous or inconsistent tags, for example in albums just downloaded. Provided they are in the same folder they will be grouped together. I generally use this over the Album sort and group.
Primary Sort:
CODE
$replace(%path%,%filename_ext%,)

Secondary Sort:
CODE
%tracknumber%

Group by:
CODE
$replace(%path%,%filename_ext%,)


Random
Primary Sort & Secondary Sort:
CODE
$rand()


Title
Primary Sort
CODE
%title%

Secondary Sort - sort by artist if two tracks have the same name.
CODE
%artist%


If no title exists then it should probably sort by filename.

Other criteria
I haven't implemented these yet but I see a need for them - Sorting by track format e.g. mp3, flac, etc., Sorting by Track Length, Size, Rating, "%ALBUM ARTIST%" (to separate VA albums from the rest?).

I am slightly confused - in sort criteria there is a group by code panel and a group by check box. Then in the playlist edit there are the two checkboxes group and sort. Something seems redundant here, if everything had grouping enabled we could easily turn it off in our presets. Or alternatively, we could turn it off before making our presets. I think the former is more powerful but will need smarter preset use.

TheBlackCat
album artist should probably be fairly similar to artist, just for simplicity:

Primary:
CODE
$if($get(album_artist),,$put(album_artist,$upper(%album artist%)))


Secondary:
CODE
%date% %title%


I also think allowances need to be made for CWB's $cwb_removethe and $cwb_ltrim, since not everyone has those but they are pretty useful if you do.


Another useful one is group by first letter of track (all A's together, all B's together, etc). If you want track title as your primary sort, there is really no other good way to group things.

Primary:
CODE
$upper($left(%title%,1))



You would obviously want as your secondary sort title immediately after, although artist and album are more arbitrary.

Secondary:
CODE
$upper(%title% %artst% %album%)





Yotsuya
I don't like the idea of pushing people to conform to certain sort strings.

I love foobar because I can customize it to organize my music the way I want to.. not necessarily the way the majority of a group of forum dwellers decide is trendy. Different people use different tags and their sorting and grouping reflects those tags. I wouldn't want to waste resources processing a dozen tags I don't have any intention of ever using (like %rating%, %hotness%, %playcount%, or any of the other myriad of user-specific tags). Also different people use different approaches to VA albums and Albums vs. Singles. I do not use and do not want to use %track artist% nor %single%. I like using %album artist% and %tracknumber%. These are my personal tastes and again one of foobar's biggest strengths is allowing users to use such widely different schemes for managing their music collections. While yes there should be a few basic presets by default for new users, IMO any advanced user would want to delete them and create their own ASAP. If these were replaced with some sort of hard-coded "standard" set of presets I wont be migrating to them without a lot of kicking and screaming. If the point of this thread is to democratically formulate what those basic default presets are then I'm sorry I missed the point of the thread and don't really see how it is such a big deal as to warrant a dedicated thread for the issue.

I would like to see the Sorting/Grouping schemes moved from the .cfg to the .pui as they are a vital part of the interface design and can change significantly from one interface to the next.

Since everyone else is sharing their settings here is mine for the main album grouping scheme I use:

Artist:
Primary Sort:
[%album artist%]

Date:
Primary Sort:
$if(%tracknumber%,%date%,!single)

Catalog:
Primary Sort:
$if(%tracknumber%,%cdid%,!single)

Album:
Primary Sort:
$if(%tracknumber%,%album%,!single)
Group By:
$if(%tracknumber%,%album%,!noheader!)

Disc Number:
Primary Sort:
$if(%tracknumber%,%discnumber%,!single)
Group By:
$if(%tracknumber%,%discnumber%,)

Track Number:
Primary Sort:
[%discnumber% ][%tracknumber%]

Song Name:
Primary Sort:
[%title%]

I do not group by sort and I only group by album and disc number. I like to view my playlist organized by how it would appear in physical media, more or less in the order of release. I also use a scheme for online radio playlists involving genre grouping and sorting by codec and bitrate.
FofR
QUOTE(Yotsuya @ Apr 2 2007, 06:19) *

I don't like the idea of pushing people to conform to certain sort strings.


Im not proposing this, I am proposing a standard set of default sort by strings that layout designers can work to.
yodalige
I'm sorry, I know this is probably not the place for this question, but I didn't want to start a new thread for it cause it should be a fairly quick question and it is pertinent to this discussion. Can someone please point me to places where I can learn about what the exclamation mark in the code does? Like !single, !noheader!.....I have read through the title formatting wiki and unless I missed it, it doesn't talk about this. Also, if there are any other pages that expand on the title formatting wiki, that may have more info, please let me know.

Again, sorry for the off topic post.

Thanks!
Yotsuya
yodalige: The exclamation mark doesn't really hold special significance. !noheader! is a special string that SCPL looks for, if your entire group by string resolves to !noheader! (and only !noheader!, other strings containing !noheader! do not count) then SCPL will hide the header for the group. By using !single in the sort strings we are basically grouping items that don't match the previous code (i.e.: tracks that do not belong to an album) together and since that group name will start with punctuation it will be sorted before alphanumeric characters. This effectively makes singles appear before albums in a mixed playlist.

EDIT: I may be missing something. The more I look at the default code, the more it looks like !name is trying to reference other presets. Is it possible to mix presets on a single playlist like this? I did some basic testing and couldnt get it to work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.