Escape comma in renamer ${"comma",videoSource,}
#1
Question 
Hi!

Just upgrade to 3.0.3 and was messing around with the renamer.

Here the string I use for movies.
Code:
${title} ${- ,edition,} (${year}) [${videoFormat}${-,videoCodec,}${-,videoBitDepth,b}${-,hdr,}, ${audioCodec}${-,audioChannels,}${ (,mediaSource,)}]

An example look like this with the above:
"The Matrix (1999) [2160p-HEVC-10b-HDR, Atmos-8ch (UHD Blu-ray)]"

Would like it like this:
"The Matrix (1999) [2160p-HEVC-10b-HDR, Atmos-8ch, UHD Blu-ray]"
And if videoSource is missing it should look like this:
"The Matrix (1999) [2160p-HEVC-10b-HDR, Atmos-8ch]"

I put (maybe to much) info in the filename. Would like to use the optional syntax ${prefix,variable,postfix} where prefix could be a comma ",".

Can't get this working. Is it possible?

Awsome experience with the new version of tMM! Kudos!
#2
I don't think this will work with the _short_ optional syntax since the comma is the parameter separator in there. But there would be 2 alternatives:

a) replace the comma by a somicolon (should not make any problems in actual file systems)
b) use the long syntax of JMTE with if (https://gitlab.com/tinyMediaManager/tiny...-expansion)
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
Thumbs Up 
(2019-08-31, 15:31)mlaggner Wrote: I don't think this will work with the _short_ optional syntax since the comma is the parameter separator in there. But there would be 2 alternatives:

a) replace the comma by a somicolon (should not make any problems in actual file systems)
b) use the long syntax of JMTE with if (https://gitlab.com/tinyMediaManager/tiny...-expansion)

Hi, and thanks for answering.

Understood that it interfered with the separator but had the hopes up for a way to escape that like "\," or something.
I ventured into the long JMTE syntax but didn't fully grasp how to accomplish it with that. I'll resort to using ";" in my renamer.

Brgs,
#4
(2019-09-01, 16:28)iorx Wrote:
(2019-08-31, 15:31)mlaggner Wrote: I don't think this will work with the _short_ optional syntax since the comma is the parameter separator in there. But there would be 2 alternatives:

a) replace the comma by a somicolon (should not make any problems in actual file systems)
b) use the long syntax of JMTE with if (https://gitlab.com/tinyMediaManager/tiny...-expansion)

Hi, and thanks for answering.

Understood that it interfered with the separator but had the hopes up for a way to escape that like "\," or something.
I ventured into the long JMTE syntax but didn't fully grasp how to accomplish it with that. I'll resort to using ";" in my renamer.

Brgs,      

Feedback on ";", didn't work. The behavior is similar to when I try to use ",".

This works:
Code:
${ (,mediaSource,)}

This doesn't:
Code:
${; ,mediaSource,}
The preview of the filename shows the renamer string.

I'm back to enclose mediaSource with parentheses.

Brgs,

Logout Mark Read Team Forum Stats Members Help
Escape comma in renamer ${"comma",videoSource,}0