Hi,
I'd like to strip the word "The" in front of artists when creating the directory... for example:
The Doors -> Doors
I tried this, but it doesn't seem to be working:
[IFEQUALS][GRAB]1,3,artist[],The,[GRAB]5,[artist][][]
Any suggestions?
Spoon
01-18-2008, 03:34 AM
I don't think it is possible, as your grab is putting the value into ifequals when it needs the tag name.
Well... after a little thinking about it, I discovered that is is possible! :smile2:
What I needed was a way to know if the Artist tag began with a "The"... and since the IFEQUALS is looking for a tag name only in the firts element, I figured, why not hack the second one?
So, here's what I did:
[IFEQUALS]artist,The [DEL]1,4,[artist][],[TRIM][DEL]1,4,[artist][], The[][]
In the second element, I'm replacing the first four letters with the text "The ". If the artist tag already had the "The " at the beginning, then the values would be equal.
For example, let's use the arist tag of "The Doors":
[artist] = "The Doors"
[DEL]1,4,[artist][] = "Doors"
The [DEL]1,4,[artist][] = "The Doors"
They are equal ("The Doors" = "The Doors"), so insert the value in the third element:
[TRIM][DEL]1,4,[artist][], The[][] = "Doors, The"
(I used the [TRIM] function just in case there were any blank spaces... also, because I'm inserting a value of a comma (',') I didn't want to confuse the thing)
Here's an example of an artist that fails that test, "Led Zeppelin":
[artist] = "Led Zeppelin"
[DEL]1,4,[artist][] = "Zeppelin"
The [DEL]1,4,[artist][] = "The Zeppelin"
They are not equal ("Led Zeppelin" != "The Zeppelin"), so I don't insert the value.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.