Page 1 of 1

Video file not renamed correctly

Posted: 18 Jun 2021, 16:52
by JazzCarnival
Dear all,

Normally I use the following expression for my movie collection:

{plex.derive{" [$lang]"}{" [$vf, $vc, $ac]"}}

But only the subtitle file adds the language, not the video file. Please see below the example:

Movie (2021) [1080p, x264, AAC].mp4
Movie (2021) [eng] [1080p, x264, AAC].eng.srt

Any ideas?

Thanks

Re: Video file not renamed correctly

Posted: 18 Jun 2021, 17:11
by rednoah
lang is the subtitle language extension, and thus defined only if the file at hand is a subtitle file, by design.



EDIT:

:!: Adding language tags to video files based on nearby subtitles files is probably possible via the {model} binding, but also probably out-of-reach for users without Groovy programming expertise.

Re: Video file not renamed correctly

Posted: 18 Jun 2021, 18:21
by JazzCarnival
hi rednoah,

Could you please let me know which extension I should use to extract the audio language of the video file?

Thanks

Re: Video file not renamed correctly

Posted: 19 Jun 2021, 02:37
by rednoah
I see. In that case, {audioLanguages} is the binding you're looking for:

Code: Select all

{audioLanguages}
:idea: https://www.filebot.net/naming.html