Skip to main content
Topic: Template function 'if variable value equal to fixed string then do X'? (Read 215 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Template function 'if variable value equal to fixed string then do X'?

Hello,

first of all I have recently started exploring the topic of audio ripping and am still getting familiar with CUETools.
Therefore, please forgive me if I write impossible nonsense here or (even worse) things that are already possible.
It's not like I didn't try. I've probably been sitting here for more than 2 hours and playing around with the template function and also learned several things with help of the wikis.

Well, I'd like to know if it might be possible to compare a fixed value with the result of a variable via the template function and execute an action depending on the result?

I imagine it like this:
Code: [Select]
$ifstringequal(%genre%,Soundtrack,' ('OST')')

or in total:

$ifstringequal(%artist%,Various Artists,VA - )[%year% - ]%album%$ifstringequal(%genre%,Soundtrack,' ('OST')') %CODEC%

Folder name: VA - 1994 - Pulp Fiction (OST) FLAC

Greetings
Martin

Re: Template function 'if variable value equal to fixed string then do X'?

Reply #1
No.
Also keep in mind that CUETools template syntax is "based on" foobar2000 title formatting syntax. This simply means the foobar2000 title formatting syntax was a source of inspiration. Do not assume functions and variables available in foobar2000 are available in CUETools.
korth

Re: Template function 'if variable value equal to fixed string then do X'?

Reply #2
Ok, thanks for clarifying.

It would be great if the developers would consider adding such a feature then.
Maybe even in the form of support for a scripting language like LUA or JS. I think that would open up a lot of potential.

 
SimplePortal 1.0.0 RC1 © 2008-2019