title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 4 of 4

Thread: Naming Scheme Question

  1. #1

    Join Date
    Jan 2008
    Posts
    4

    Naming Scheme Question

    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?

  2. #2
    Administrator
    Join Date
    Apr 2002
    Posts
    39,025

    Re: Naming Scheme Question

    I don't think it is possible, as your grab is putting the value into ifequals when it needs the tag name.

  3. #3

    Join Date
    Jan 2008
    Posts
    4

    Re: Naming Scheme Question

    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.

  4. #4
    Administrator
    Join Date
    Apr 2002
    Posts
    39,025

    Re: Naming Scheme Question

    Very cleaver!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •