IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Feature request: predefined variables!
Anakunda
post Nov 17 2012, 23:20
Post #1





Group: Members
Posts: 414
Joined: 24-November 08
Member No.: 63072



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
$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 cool.gif
Go to the top of the page
+Quote Post
akuma
post Nov 18 2012, 00:38
Post #2





Group: Members
Posts: 29
Joined: 24-September 07
Member No.: 47303



seconded. this would complicate things a little bit on the support end, but increase individuality/flexibility alot on the user end.
Go to the top of the page
+Quote Post
skipyrich
post Nov 18 2012, 04:47
Post #3





Group: Members
Posts: 206
Joined: 28-April 04
Member No.: 13769



foo_exvar?


--------------------
My English is very good!
...in comparison with my Korean language...
Go to the top of the page
+Quote Post
ojdo
post Nov 18 2012, 06:46
Post #4





Group: Members
Posts: 894
Joined: 18-June 06
From: Germany
Member No.: 31980



foo_dynfil allows exactly what you request.


--------------------
http://freemusi.cc/
Go to the top of the page
+Quote Post
Anakunda
post Nov 18 2012, 09:53
Post #5





Group: Members
Posts: 414
Joined: 24-November 08
Member No.: 63072



QUOTE (ojdo @ Nov 18 2012, 06:46) *
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..


This post has been edited by Anakunda: Nov 18 2012, 10:12
Go to the top of the page
+Quote Post
Anakunda
post Nov 18 2012, 10:59
Post #6





Group: Members
Posts: 414
Joined: 24-November 08
Member No.: 63072



....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.
Go to the top of the page
+Quote Post
Anakunda
post Nov 19 2012, 17:34
Post #7





Group: Members
Posts: 414
Joined: 24-November 08
Member No.: 63072



*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. rolleyes.gif
Go to the top of the page
+Quote Post
foosion
post Nov 19 2012, 19:54
Post #8





Group: FB2K Moderator (Donating)
Posts: 4336
Joined: 24-February 03
Member No.: 5153



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


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Anakunda
post Nov 19 2012, 23:08
Post #9





Group: Members
Posts: 414
Joined: 24-November 08
Member No.: 63072



QUOTE (foosion @ Nov 19 2012, 19:54) *
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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th April 2014 - 18:34