Plex binding and subtitles

Any questions? Need some help?
Post Reply
angusc
Posts: 2
Joined: 05 Nov 2019, 16:23

Plex binding and subtitles

Post by angusc » 05 Nov 2019, 17:17

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

User avatar
rednoah
The Source
Posts: 16782
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex binding and subtitles

Post by rednoah » 05 Nov 2019, 17:28

Here's the easy way:

Code: Select all

{plex.derive{" - $vf.$vc.$ac"}}
:idea: viewtopic.php?t=4116
:idea: Please read the FAQ and How to Request Help.

Post Reply