title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Naming Scheme Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msb
    • Jan 2008
    • 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?
  • Spoon
    Administrator
    • Apr 2002
    • 43900

    #2
    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.
    Spoon
    www.dbpoweramp.com

    Comment

    • msb
      • Jan 2008
      • 4

      #3
      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.

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 43900

        #4
        Re: Naming Scheme Question

        Very cleaver!
        Spoon
        www.dbpoweramp.com

        Comment

        Working...

        ]]>