Im so lost Please help with movie + subtitle renaming

All about user-defined episode / movie / file name format expressions
Post Reply
winecountrymedia
Posts: 17
Joined: 06 Sep 2023, 04:22

Im so lost Please help with movie + subtitle renaming

Post by winecountrymedia »

Ok I have these

Code: Select all

Back.To.Black.2024.1080p.WEBRip.x264.AAC5.1-[YTS.MX].mp4
Back.To.Black.2024.1080p.WEBRip.x264.AAC5.1-[YTS.MX]eng.srt
Back.To.Black.2024.1080p.WEBRip.x264.AAC5.1-[YTS.MX]forced.eng.srt
Back.To.Black.2024.1080p.WEBRip.x264.AAC5.1-[YTS.MX]spa.srt
I want them to be in a folder like this
Movie -

Code: Select all

Back to Black (2024) [Language (only when foreign), Genre, Resolution]
or

Code: Select all

Back to Black (2024) [English, Drama, 1080p]
Subtitles
inside main movie folder with the name with language attached

Code: Select all

Back to Black (2024) [English, Drama, 1080p].eng.srt
Back to Black (2024) [English, Drama, 1080p].forced.eng.srt 
Back to Black (2024) [English, Drama, 1080p].spa.srt 
right now I'm getting the movie in its own folder and each subtitle in its own folder Ive been playing with this for more than an hour and my head hurts. Please help. I'm using the windows .exe program with files that are on an unraid server. Not sure if you needed this info.

This is my current syntax - I'm aware it has them setup to be in a "subtitles" folder I would prefer they just be in the main folder with the movie but I could only find info on a previous users post on how to add them into the subtitles folder.

Format: Select all

M:\Movies\Main\{ny}{' CD'+pi}{subt} {allOf{ languages =~ /eng/ ? null : languages.name[0].upper() }{genre}{vf}.joining(', ', ' [', ']')}/{if (ext == 'srt') 'subtitles/''.'+lang}/{ny}
Thanks in advance!
winecountrymedia
Posts: 17
Joined: 06 Sep 2023, 04:22

Re: Im so lost Please help with movie + subtitle renaming

Post by winecountrymedia »

I actually need to update this as I see I made a mistake. I want the main movie folder to be

Code: Select all

Back to Black (2024) [English, Drama, 1080p]
the files movies/subtitles inside to be

Code: Select all

Back to Black (2024).eng.srt
Back to Black (2024).forced.eng.srt
Back to Black (2024).spa.srt
User avatar
rednoah
The Source
Posts: 23216
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Im so lost Please help with movie + subtitle renaming

Post by rednoah »

:?: What does Language (only when foreign) mean? By default I'd say English, but all your examples do include English, so I guess there's just no difference between English / non-English movies then?


Here's something to get you started:

Format: Select all

X:/Movies/{ ny } { allOf{ language.name }{ genre }{ vf } }/{ ny }{ subt }
That'll give you file paths like this:

Code: Select all

X:/Movies/Back to Black (2024) [English, History, 2160p]/Back to Black (2024)
X:/Movies/Back to Black (2024) [English, History, 2160p]/Back to Black (2024).eng
It's just a simple replacement pattern, so shouldn't pose much of a headache:
  • X:/Movies/ => X:/Movies/
  • { ny } => Back to Black (2024)
  • { allOf{ language.name }{ genre }{ vf } } => [English, History, 2160p]
  • { subt } => .eng
Screenshot




:!: forced detection may not work because [...]forced.eng is not a known pattern. FileBot expects something like .eng.forced in that order. {subt} will give you .eng-forced if the files are well-named.
:idea: Please read the FAQ and How to Request Help.
winecountrymedia
Posts: 17
Joined: 06 Sep 2023, 04:22

Re: Im so lost Please help with movie + subtitle renaming

Post by winecountrymedia »

thank you so much! I know I was just trying to show a description of what I was talking about. It says english is fine by me. Just the way I had it before would only add the language if it were anything besides english. I only have one more issue. What do I do when there are multiple for one language? Like forced eng and standard eng? like one I have is traditional chinese and simplified chinese? there is also European spanish and standard spanish? How can I make it move both with their full language? Because obviously if there is more than one of each language it will just choose the top one and mark any others as duplicates and not rename/move them. Thank you again for your help!
User avatar
rednoah
The Source
Posts: 23216
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Im so lost Please help with movie + subtitle renaming

Post by rednoah »

winecountrymedia wrote: 08 Jun 2024, 07:21 What do I do when there are multiple for one language? Like forced eng and standard eng? like one I have is traditional chinese and simplified chinese? there is also European spanish and standard spanish?
In general, {subt} will give you different values for different subtitle files, thus generating unique file paths:

Code: Select all

.eng
.eng-forced
.spa
.mxn
.zho
.zht

Specifically, the result depends on the input files, and things may work more or less well depending on the input file naming at hand:
rednoah wrote: 07 Jun 2024, 08:10 :!: forced detection may not work because [...]forced.eng is not a known pattern. FileBot expects something like .eng.forced in that order. {subt} will give you .eng-forced if the files are well-named.
:idea: Please read the FAQ and How to Request Help.
winecountrymedia
Posts: 17
Joined: 06 Sep 2023, 04:22

Re: Im so lost Please help with movie + subtitle renaming

Post by winecountrymedia »

Ok thanks I appreciate all your help. Is this your application? If so great job you are amazing!
User avatar
rednoah
The Source
Posts: 23216
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Im so lost Please help with movie + subtitle renaming

Post by rednoah »

Cheers! Feel free to join the community here or on Discord, and recommend FileBot to all your friends!
:idea: Please read the FAQ and How to Request Help.
Post Reply