title
Products            Buy            Support Forum            Professional            About            Codec Central
 

[IFVALUE] not liking comma in string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • losinj

    • Oct 2008
    • 5

    [IFVALUE] not liking comma in string

    Has anyone else had a problem when nesting this popular method of switching "The" to the end of something ...
    Code:
    [IFEQUALS]artist,The [DEL]1,4,[artist][],
    	[TRIM][DEL]1,4,[artist][], The[]
    []
    [IF!EQUALS]artist,The [DEL]1,4,[artist][],
    	[artist]
    []
    ... into an [IFVALUE] script?

    I've used [artist] as an example. "The Police" should output as "Police, The", but instead I get just "Police".

    I found by entering this test script into the Naming field
    Code:
    [IFVALUE]artist,[TRIM][DEL]1,4,[artist][][B][COLOR="red"], The[/COLOR][/B][],test[]
    and watching the Example output, by removing the comma in "[COLOR="red"], The[/COLOR]" it would change "Police" to "Police The".

    I would say the comma should be interpretted as being within the [TRIM] statement, but not by [IFVALUE] it would seem. Is this a bug or have I got something wrong?
    Last edited by losinj; October 12, 2008, 12:22 PM.
  • Spoon
    Administrator
    • Apr 2002
    • 44583

    #2
    Re: [IFVALUE] not liking comma in string

    Using CD Ripper? there is a meta data option to automatically do this (se ID Tags & Meta Data Options).
    Spoon
    www.dbpoweramp.com

    Comment

    • losinj

      • Oct 2008
      • 5

      #3
      Re: [IFVALUE] not liking comma in string

      Hi Spoon,

      Yes, thx, I had previously disabled that option because I had planned for my script to handle both [album artist] and [artist] in the same way. Enabling it again has helped me to simplify the code AND avoid the "anomaly".

      The automatic option appears not to affect [album artist], so I managed to rearrange the script to handle [album artist] and leave [artist] to the automatic option. Bingo!

      Ta muchly!
      Code:
      [IFCOMP]
      	[IFEQUALS]album artist,The [DEL]1,4,[album artist][],
      		[TRIM][DEL]1,4,[album artist][], The[]
      	[]
      	[IF!EQUALS]album artist,The [DEL]1,4,[album artist][],
      		[IFVALUE]album artist,[album artist],Various Artists[]
      	[]
      []
      [IF!COMP]
      	[IFEQUALS]album artist,The [DEL]1,4,[album artist][],
      		[TRIM][DEL]1,4,[album artist][], The[]
      	[]
      	[IF!EQUALS]album artist,The [DEL]1,4,[album artist][],
      		[IFVALUE]album artist,[album artist],[B][COLOR="Blue"][artist][/COLOR][/B][]
      	[]
      []
      \
      [album]
      \
      [IFMULTI][disc]-[][SETLEN]2,48,,[track][] [artist] - [title]
      Code:
      [IFCOMP][IFEQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][DEL]1,4,[album artist][], The[][][IF!EQUALS]album artist,The [DEL]1,4,[album artist][],[IFVALUE]album artist,[album artist],Various Artists[][][][IF!COMP][IFEQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][DEL]1,4,[album artist][], The[][][IF!EQUALS]album artist,The [DEL]1,4,[album artist][],[IFVALUE]album artist,[album artist],[artist][][][]\[album]\[IFMULTI][disc]-[][SETLEN]2,48,,[track][] [artist] - [title]
      Last edited by losinj; October 12, 2008, 03:06 PM.

      Comment

      Working...

      ]]>