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
    • 44009

    #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] = "[COLOR="Blue"]The Doors[/COLOR]"
      [DEL]1,4,[artist][] = "[COLOR="SeaGreen"]Doors[/COLOR]"
      [COLOR="Red"]The[/COLOR] [DEL]1,4,[artist][] = "[COLOR="Red"]The [/COLOR][COLOR="SeaGreen"]Doors[/COLOR]"

      They are equal ("[COLOR="Blue"]The Doors[/COLOR]" = "[COLOR="Red"]The [/COLOR][COLOR="SeaGreen"]Doors[/COLOR]"), 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] = "[COLOR="blue"]Led Zeppelin[/COLOR]"
      [DEL]1,4,[artist][] = "[COLOR="seagreen"]Zeppelin[/COLOR]"
      [COLOR="Red"]The [/COLOR][DEL]1,4,[artist][] = "[COLOR="red"]The [/COLOR][COLOR="seagreen"]Zeppelin[/COLOR]"

      They are not equal ("[COLOR="Blue"]Led Zeppelin[/COLOR]" != "[COLOR="red"]The [/COLOR][COLOR="seagreen"]Zeppelin[/COLOR]"), so I don't insert the value.

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44009

        #4
        Re: Naming Scheme Question

        Very cleaver!
        Spoon
        www.dbpoweramp.com

        Comment

        Working...

        ]]>