Page 1 of 1

Double language segment on rename

Posted: 30 Sep 2024, 16:06
by dashard
I searched but this issue either doesn't exist here or I didn't find the right search params to land on solution.

When renaming the contents of a movie folder which contains subtitles, the language suffix gets doubled.

Image

My code is pretty straightforward…

Code: Select all

/Volumes/video/Movies/{n0 = n.sortName().charAt(0); n0.isDigit() ? '[0-9]' : n0}/{ ~plex.id } [{vf}]{ '.' + lang.ISO3 }
Any ideas how I can code that extra middle language suffix out without having to do it manually?

Re: Double language segment on rename

Posted: 30 Sep 2024, 16:30
by rednoah
:idea: { ~plex.id } already adds the language suffix. The { '.' + lang.ISO3 } you have added at the end of your format adds the additional language suffix at the end of the file name.



:idea: The {plex} format manual has the following example for us to copy & paste to get started:

Format: Select all

{ ~plex.id % { " {edition-$edition}" } % { " [$vf, $vc, $ac]" } }
:arrow: We can simply that for our use case like so:

Format: Select all

/Volumes/video/Movies/{az}/{ ~plex.id % { " [$vf]" } }