Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Feature request: predefined variables! (Read 1652 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Feature request: predefined variables!

HI!!

I wanted to suggest this feature. May create a new pane in preferences dialog with list of predefined variables. This certainly would significantly simplify most of file operations and converter filename templates. I give an example: everywhere in file name formatting strings I use same expression for track number.

Code: [Select]
$ifgreater(%tracknumber%,0,$num(%tracknumber%,$ifgreater($trim(%totaltracks%),0,$max($len($num($trim(%totaltracks%),0)),2),2)),$upper($trim(%tracknumber%)))


Defining a global variable such as tn containing this pattern would be also very powerful if I decide in future to change this tracknumber formula to something yet more obfuscated, to just change the global variable instead of editing all presets individually. I suppose this feature isnot too complicated to implement so I hope Peter or some other developer will make it come truth 

Feature request: predefined variables!

Reply #1
seconded. this would complicate things a little bit on the support end, but increase individuality/flexibility alot on the user end.

Feature request: predefined variables!

Reply #2
foo_exvar?
My English is very good!
...in comparison with my Korean language...

Feature request: predefined variables!

Reply #3
foo_dynfil allows exactly what you request.

Feature request: predefined variables!

Reply #4
foo_dynfil allows exactly what you request.


I already thought this is what I wanted but it doesnot seem to work as I expect.
Defined in it a new variable tracknumber with expression from post #1.
Found this working in converter presets. Using this in any file operation preset %_tracknumber% behaves as undefined. Is this a bug or feature? I meen the predefined variables could be used everywhere when foobar metadata are excepted..

Feature request: predefined variables!

Reply #5
....Moreover dynfill doesnot generate empty pseudotags, for example %_foo% defined as $if3(%tag1%,%tag2%,%tag3%) produces zero width defined tag while expanded $if3(%tag1%,%tag2%,%tag3%) produces undefined tag where none of tag1, tag2 and tag3 is present. I'd need then _foo behaves also as not present at all so that [ - %_foo%] including the hyphen is skipped whenever none of tag1, tag2 and tag3 is present.

Feature request: predefined variables!

Reply #6
*BUMP*

foo_dynfill is not working at all for File Ops and Converter (except preview in converter), otherwise all virtual fields are handled as not present.
There's no need for timed updating or special handling, just to expand all global variables at the time of preocessing.

P.S. I hope some of developer still notices this and implements.

Feature request: predefined variables!

Reply #7
If it works in one part of foobar2000 but not in another then that sounds like it isn't the fault of foo_dynfil.

 

Feature request: predefined variables!

Reply #8
If it works in one part of foobar2000 but not in another then that sounds like it isn't the fault of foo_dynfil.


I don't know the foobar API system but tho it might not handle situations where title formatting is used for any other purpose than displaying. Then any other solution is needed for file names formatting.