Help - Search - Members - Calendar
Full Version: Tell me why this formatting doesn't work
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Killmaster
$puts(The,$if3(%split%,%album artist%,%artist%,Unknown Artist))

$if($stricmp($left($get(The),4),'the'),$substr($get(The),5,$len($get(The)))', The',$get(The))

I'm using this in the Album List Panel. I want it to remove the "The" on either %split%, %album artist%, or %artist% tags, then reattach it to the end. While the string works, however, it doesn't remove the "the" from those things? Any thoughts? It seems straightforward enough, all it should do is check for each one when it processes the data.
upNorth
The first I can see is that you compare the first 4 characters of the variable The to the 3 letter word 'the'.

I'll test your code now...

Edit: Yeah, that's it. I would suggest you add a space to your test string 'the' ('the '), so that you actually compare it to a four letter string. That way you also avoid messing up artists like "Them Mushrooms".

Edit: Minor rewrite x2 as Firefox crashed...
Killmaster
doh!

That's what I get for c&p code..
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.