Help - Search - Members - Calendar
Full Version: sorting artists with 'the' at beginning
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
dmented7
Hi.. I am trying to find out how foobar can display artist who have 'the' at the beginning, e.g. The Smiths, to display at 'S' rather than 'T', like iTunes does.
I'm sure it's quite a simple fix... but I just cant seem to find out how to do it.... GRRR sad.gif
Anyone have any ideas ...? (apart from having to change to 'Smiths, The)
Octavian
QUOTE(dmented7 @ Jan 11 2007, 20:05) *

Hi.. I am trying to find out how foobar can display artist who have 'the' at the beginning, e.g. The Smiths, to display at 'S' rather than 'T', like iTunes does.
I'm sure it's quite a simple fix... but I just cant seem to find out how to do it.... GRRR sad.gif
Anyone have any ideas ...? (apart from having to change to 'Smiths, The)



I have made something like this:

I created a tag named: %THE% with the value "The". The tag I applied only for the artist with The, like THE Prodigy, THE Cranberries, etc...

In the tag field named %ARTIST% I deleted "The". So for "The Prodigy" I have only "Prodigy".

Than in the ARTIST column for ColumnUI I have this scripts codes:
For DISPLAY:
[%THE% ]%artist%

For SORT field:
%artist%%album%%DISCNUMBER%


Sorry my English, is not my native language
wraithdu
In your Artist column sort order, replace %artist% with -

CODE

$if($stricmp($left(%artist%,3),'The'),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)

dmented7
Thanks both of you, it worked!
2Pacalypse
QUOTE(dmented7 @ Jan 11 2007, 20:09) *

Thanks both of you, it worked!


hmm i tried in on the group display in scpl and it didnt work
Hakubo
QUOTE(wraithdu @ Jan 11 2007, 21:36) *

In your Artist column sort order, replace %artist% with -

CODE
$if($stricmp($left(%artist%,3),'The'),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Ever listened to Therion? smile.gif

CODE
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Funkdude
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
Valdoran
QUOTE(Hakubo @ Jan 12 2007, 11:06) *

Ever listened to Therion? smile.gif

CODE
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)


Shouldn't you then take the substring of %artist% starting at 5, instead of 4?

CODE
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),5))
,
[%artist%]
)
Hakubo
QUOTE
Shouldn't you then take the substring of %artist% starting at 5, instead of 4?
$sub != substring. It's "subtract". This operator is used here for evaluating the number of symbols we take from the original string (starting from the right, hence the $right operator).

QUOTE
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
I think so.
Replace the %album artist% in the desired view strings with
CODE
$if($stricmp($left(%album artist%,4),'The '),$right(%album artist%,$sub($len(%artist%),4))', 'The,[%album artist%])
Funkdude
QUOTE(Hakubo @ Jan 12 2007, 16:46) *

QUOTE
Shouldn't you then take the substring of %artist% starting at 5, instead of 4?
$sub != substring. It's "subtract". This operator is used here for evaluating the number of symbols we take from the original string (starting from the right, hence the $right operator).

QUOTE
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
I think so.
Replace the %album artist% in the desired view strings with
CODE
$if($stricmp($left(%album artist%,4),'The '),$right(%album artist%,$sub($len(%artist%),4))', 'The,[%album artist%])



Worked, thank you!
tool++
QUOTE(wraithdu @ Jan 11 2007, 18:36) *

In your Artist column sort order, replace %artist% with -

CODE

$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))', The'
,
[%artist%]
)





Edited for betterness. :]

Because your previous code include anything that stated with "The" like These or Their or whatever.



CODE

$if($stricmp($left(%album artist%,4),'The '),
$right(%artist%,$sub($len(%album artist%),4))', The'
,
[%album artist%]
)



Also for sorting you'd want to use album artist, because that defaults to %artist% if there's no actualy %album artist%
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.