@Defender @regor
as nod-coding/developing foobar user I would certainly know where and how to use %output_rgmode% but have no idea how to use fb.ReplaygainMode. assuming there are more users like me (not coding) something like %output_rgmode% would be much apperciated.
Not relevant anymore, but it may be for further exposed settings by JSP. I was not suggesting at all that final users should be coding or using "fb.ReplaygainMode". If you have a text display script, then all that should be handled by the script. I just pointed that it's perfectly possible to write something like:
%output_rgmode% - %ALBUM% - %ARTIST%
And just replace placeholder tags in JSP3 or SMP code before evaluating the TitleFormat expression:
const userInput = .... \\ %output_rgmode% - %ALBUM% - %ARTIST%
const tf = fb.TitleFormat(userInput.replace(/%output_rgmode%/gi, fb.ReplaygainMode));
...
Which would do the same than having the new update of foo_outinfo, without that requirement. (obviously there are other benefits when using the component as already discussed)
This pattern may be applied to many more things. For ex. in my scripts I allow things like #YEAR# (current year), #PLAYLIST# (playlist name), etc. which are dynamically evaluated on every call.
SMP has a list of exposed globals here. JSP3 should have a similar one:
https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/fb.html#.GetNowPlaying
So following the pattern, this would be possible via TF too:
%ALBUM% - %ARTIST%$crlf()
Volume: %VOLUME%$crlf()
Playlists: %PLAYLISTCOUNT%$crlf()
const userInput = .... \\ See above
const tf = fb.TitleFormat(
userInput.replace(/%output_rgmode%/gi, fb.ReplaygainMode)
.replace(/%VOLUME%/gi, (100 + fb.Volume) + '%')
.replace(/%PLAYLISTCOUNT%/gi, fb.PlaylistCount)
);
...
Would output:
Hey Joe - Jimi Hendrix
Volume: 90%
Playlists: 24
There are so many things which can be retrieved this way.
Thanks for the update case