Page 1 of 1

Plex binding and subtitles

Posted: 05 Nov 2019, 17:17
by angusc
Using the plex naming binding, video and subtitle files would be named as follows:

Code: Select all

Avatar (2009)/
	Avatar (2009).mp4
	Avatar (2009).eng.srt
My issue comes from multi-version items as documented here.

Plex allows for additional info to be included to differentiate files, so I used "{plex} - {vf}.{vc}.{ac}". For video files this works perfectly, but for subtitles, it creates a problem:

Code: Select all

Avatar (2009)/
	Avatar (2009) - 1080p.x264.AAC.mp4
	Avatar (2009).eng  - 1080p.x264.AAC.srt
I tried using {plex.name} and adding {lang} to the end, but the first ".eng" remains at the end of the plex binding in subtitles, which makes sense as the lang is built into the plex binding by default for subtitle files.

To be clear, the following is the output I'm trying to achieve:

Code: Select all

Avatar (2009)/
	Avatar (2009) - 1080p.x264.AAC.mp4
	Avatar (2009) - 1080p.x264.AAC.eng.srt
From various posts I'm sure there's a complicated way I could fix this, but I suspect there's an easy way. Given that plex officially supports additional info as part of the naming scheme, what's the easy way to accomplish this while still using the plex binding?

Thanks

Re: Plex binding and subtitles

Posted: 05 Nov 2019, 17:28
by rednoah
Here's the easy way:

Code: Select all

{plex.derive{" - $vf.$vc.$ac"}}
:idea: viewtopic.php?t=4116