Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Proper Sorting String (Read 5975 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Proper Sorting String

Has anyone set up foobar to sort albums in this way?

Proper Sorting String

Reply #1
[removed]

 

Proper Sorting String

Reply #2
To ignore the leading "The" ("The Beatles" is turned into "Beatles") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4)),%artist%)


To put a leading "The" behind the artist tag ("The Beatles" is turned into "Beatles, The") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)

Proper Sorting String

Reply #3
Quote
To ignore the leading "The" ("The Beatles" is turned into "Beatles") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4)),%artist%)


To put a leading "The" behind the artist tag ("The Beatles" is turned into "Beatles, The") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)

[a href="index.php?act=findpost&pid=343261"][{POST_SNAPBACK}][/a]
Thanks, this is what I was after.  Stormy's code is a little too fancy (and I only need it for the artist)

Proper Sorting String

Reply #4
Can someone tell me if this code works with v0.9.1? Also, where should I insert the code? I'm only looking for the artist sorting. I'm a big time noob at this as you can see.

Proper Sorting String

Reply #5
To ignore the leading "The" ("The Beatles" is turned into "Beatles") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4)),%artist%)


To put a leading "The" behind the artist tag ("The Beatles" is turned into "Beatles, The") use:

Code: [Select]
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)



Is there any way you can make it so it says "The (artist)" but still sort it alphabetically by "(artist)"?

Proper Sorting String

Reply #6
Wow, way to resurrect a year and a half old thread guys! 

Can someone tell me if this code works with v0.9.1? Also, where should I insert the code? I'm only looking for the artist sorting. I'm a big time noob at this as you can see.
I'm sure the code will work with any version of foobar.  Where to put it depends on what you want to sort.  If you're talking about sorting a column in columnsUI, go to preferences -> ColumnsUI.  Click on the "columns" tab and select the column of interest (in this case "Artist").  Enter the code in the "display" box.  Make sure that use custom sort spec is NOT checked (this means it will be sorted based on the "display" text)


Is there any way you can make it so it says "The (artist)" but still sort it alphabetically by "(artist)"?
Similar to the above instructions, but paste the code in the "Sort" box instead of "display".  Check the "use custom sort spec" option.


If you guys are looking to sort something else (such as the album list), just find the relevent options area and look around for the correct place to put the code.

Proper Sorting String

Reply #7

Is there any way you can make it so it says "The (artist)" but still sort it alphabetically by "(artist)"?
Similar to the above instructions, but paste the code in the "Sort" box instead of "display".  Check the "use custom sort spec" option.


I've tried to get this to work in foo_browser, but it just goes crazy, sorting artists randomly. Do you have to do something different to use it in a Browser panel?

Proper Sorting String

Reply #8
I've tried to get this to work in uie_browser, but it just goes crazy, sorting artists randomly. Do you have to do something different to use it in a Browser panel?
I'm not sure what uie_browser is.  Can you get it to sort and display with the "Artist, The" format?  You might want to start a new thread specific to your issue.

Proper Sorting String

Reply #9
Whoops, I meant foo_browser (It's an iTunes-like browser panel that can integrate into Columns UI).