Rename video/subtitle files and add language to subtitle at same time

Support for Windows users
Post Reply
kiwichick
Posts: 9
Joined: 26 Jul 2022, 22:23

Rename video/subtitle files and add language to subtitle at same time

Post by kiwichick »

Is it possible to rename video and subtitle files together but also add the language code to the subtitle files at the same time?
eg:

Code: Select all

The Love Boat (1976) - S01E23 - Musical Cabins.eng.srt
The Love Boat (1976) - S01E23 - Musical Cabins.mp4
This is the naming format I currently use:

Code: Select all

{n} ({y}) - {s00e00} - {t.removeAll(/[!?.]+$/).colon(', ').replace('(1)', '(Part 1)').replace('(2)', '(Part 2)').replace('(3)', '(Part 3)'}
Then I've just been manually adding .eng to the subtitle files but it would be great if I could do it all at once.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename video/subtitle files and add language to subtitle at same time

Post by rednoah »

Yes. The {plex} format does this by default. Please read FAQ #1 and learn how format expressions work if you are just getting started.


:arrow: Please read the How do I organize files for Plex? guide if you are organizing files for Plex and friends:

Code: Select all

{ plex.id }

:arrow: If you are set on Name (Year) naming (NOTE: good if you happen to just prefer that; not a great choice if you add the year for identification purposes; ID markers are better) then the {emby} format happens to do this by default:

Code: Select all

{ emby }

:arrow: If you are set on writing the format yourself, then you can just add {subt} at the end of your custom format:

Code: Select all

{n} - {s00e00} - {t}{ subt }
subt ... subtitle language tag (only defined for subtitle files; always undefined for video files)
:idea: Please read the FAQ and How to Request Help.
Post Reply