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: Bands starting with the word THE (Read 7507 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bands starting with the word THE

Was wondering how I can get foobar to arrange my playlist alphabetically by disregarding the word THE when a band name starts with THE, i.e. THE BLACK CROWES, i want that to be in the B's instead of the T's

Here's what I have now:



Moderation: Replaced large screenshot by a thumbnail.

Please do not inline images larger than roughly 800x600 and 80KB.

Bands starting with the word THE

Reply #1
Instead of
Code: [Select]
%ALBUM ARTIST%
you could just write
Code: [Select]
$if($stricmp($left(%ALBUM ARTIST%,4),'The '),$substr(%ALBUM ARTIST%,5,$len(%ALBUM ARTIST%))', The ',%ALBUM ARTIST%)
. This will basically replace "The <artist>" with "<artist>, The" and otherwise leave the name as it is. You can also use it in the Album List.

Bands starting with the word THE

Reply #2
Instead of
Code: [Select]
%ALBUM ARTIST%
you could just write
Code: [Select]
$if($stricmp($left(%ALBUM ARTIST%,4),'The '),$substr(%ALBUM ARTIST%,5,$len(%ALBUM ARTIST%))', The ',%ALBUM ARTIST%)
. This will basically replace "The <artist>" with "<artist>, The" and otherwise leave the name as it is. You can also use it in the Album List.



Is there a way to run that AND one to relocate "A"??

Example: 

A New Kind of American Saint

becomes

New Kind of American Saint, A

I don't understand how you can run 2 stings back to back like that.

Also, can these strings be applied in the masstagger component to permanently change the ARTIST field of the ID3 Tags to always ensure a good sort, even if someone else uses them who doesn't use foobar?

Thanks!

I just answered my own question, that string works perfectly in masstagger.

I just renamed every band with "The" to place it on the end, after the title, in one click.

It worked fine in the Album List component as well, but I was looking for something a little more permanent.

Thanks so much. 

Bands starting with the word THE

Reply #3
without rename file you can use this string:

$cwb_ltrim(%artist%,The ,A ,La )$if($longer($replace(%artist%,$cwb_ltrim(%artist%,The ,A ,La ),),0),', '$replace(%artist%,$cwb_ltrim(%artist%,The ,A ,La ),))

A New Kind of American Saint
becomes
New Kind of American Saint, A

required:  foo_cwb_hooks
Music is my first love.

Bands starting with the word THE

Reply #4
Another Question:

How to ignore leading "The", etc. when sorting, but without set "The" at the end.

Is this possible?

Bands starting with the word THE

Reply #5
Another Question:

How to ignore leading "The", etc. when sorting, but without set "The" at the end.

Is this possible?


It's almost the same:
Code: [Select]
$if($stricmp($left(%ALBUM ARTIST%,4),'The '),$substr(%ALBUM ARTIST%,5,$len(%ALBUM ARTIST%)),%ALBUM ARTIST%)

Bands starting with the word THE

Reply #6
thanks

Bands starting with the word THE

Reply #7
Ok, another question, every time I load a new playlist, it automatically sorts them by album name and I have to go and select  menu > edit > sort > sort by  to get them in the order I would like.  Is there a way to get them to automatically sort the way that I like them to?, which is:

$if($stricmp($left(%ALBUM ARTIST%,4),'The '),$substr(%ALBUM ARTIST%,5,$len(%ALBUM ARTIST%))', The ',%ALBUM ARTIST%) - %DATE% - %ALBUM% - %DISCNUMBER% - %TRACKNUMBER% - %TITLE%

Bands starting with the word THE

Reply #8
There's an option in foobar2000's preferences. Actually, it's the first one on the "General" page. Not too hard to find

Bands starting with the word THE

Reply #9
There's an option in foobar2000's preferences. Actually, it's the first one on the "General" page. Not too hard to find


That acutall didn't work for me, but I figured it out anyway.  I just had to right click in the directory frame, and under VIEW > I just selected "by directory structure" instead of "by artist" which was what I had checked before.  Thanks anyway though!  Cheers!

Hmmm well that didn't actually work completey...... maybe album/artist?

Bands starting with the word THE

Reply #10

Another Question:

How to ignore leading "The", etc. when sorting, but without set "The" at the end.

Is this possible?


It's almost the same:
Code: [Select]
$if($stricmp($left(%ALBUM ARTIST%,4),'The '),$substr(%ALBUM ARTIST%,5,$len(%ALBUM ARTIST%)),%ALBUM ARTIST%)



I'd like to sort similarly, but leaving "The " at the beginning. I enjoyed the ability to use a custom sort string in the library in 0.8.3. 


Currently, I use Frank Bicking's Facets with the string:

Code: [Select]
[$if($strcmp($left(%album artist%,2),A ),$right(%album artist%,$sub($len(%album artist%),2))', 'A,%album artist%)]
to take care of the "A " Artists since as it is currently, Facets takes care of "The " artists.

Previously I had used:
Code: [Select]
$if3($if($strcmp($left(%album artist%,2),A ),$right(%album artist%,$sub($len(%album artist%),2))', 'A),$if($strcmp($left(%album artist%,4),The ),$right(%album artist%,$sub($len(%album artist%),4))', 'The),%album artist%)


Which moved both "A " and "The " to the end of the string name. I might start using CWB Hooks with $cwb_ltrim(%artist%,The ,A ,La ,El ,Los ) if it works with 0.9.5 (I don't know if it does).

 

Bands starting with the word THE

Reply #11
That actually didn't work for me, but I figured it out anyway.  I just had to right click in the directory frame, and under VIEW > I just selected "by directory structure" instead of "by artist" which was what I had checked before.  Thanks anyway though!  Cheers!

Hmmm well that didn't actually work completely...... maybe album/artist?


I use directory structure also. However I just renamed the folders. For example: Lord of the Rings, The is a folder, and inside are individual folders for each of the three movie soundtracks. Now, they are alphabetized correctly wherever I look, in Foobar or in Windows Explorer. The tags I left unaltered.