Page 1 of 1
Automatically add "forced" to new name?
Posted: 13 Dec 2016, 15:02
by Biff
How could FileBot automatically add "forced" to files like "ehd-fufr-x264-forced.sub" when renaming?
I assume, I have to add anything to the:
Code: Select all
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}
Re: Automatically add "forced" to new name?
Posted: 13 Dec 2016, 15:57
by rednoah
Use the {subt} binding.
Re: Automatically add "forced" to new name?
Posted: 13 Dec 2016, 19:16
by Biff
Thank you very much, rednoah,
Where have I do add it?
Many thanks again
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 01:55
by rednoah
In your format. Probably at the end somewhere.
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 08:05
by Biff
Very great, thank you very much.
How could I add the language additionally.
Many thanks again
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 10:32
by rednoah
{subt} includes the ISO 3-letter 2B code.
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 11:08
by Biff
Sounds great, what does that mean?
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 15:15
by rednoah
{subt} will give you values like .eng or .eng-forced which presumably is what you asked for.
Open the Format Editor and play with it. That's the best way to learn how various bindings work.
Re: Automatically add "forced" to new name?
Posted: 14 Dec 2016, 17:32
by Biff
Alright, I will do so, thank you very much
Re: Automatically add "forced" to new name?
Posted: 17 Dec 2016, 20:07
by Biff
When I add {subt} here (or else where)
Code: Select all
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}{subt}
"forced" is not added to the renamed files, these are the source files:
cinema-absolutely.fabulous.movie.780p-forced.sub
cinema-absolutely.fabulous.movie.780p-forced.idx
How could one correct it?
Re: Automatically add "forced" to new name?
Posted: 18 Dec 2016, 02:43
by rednoah
1.
Subtitles should conform with
.<lang>-forced.<ext> naming.
2.
If you want to grab the "forced" from anywhere in the filename, then you can just match it from the filename:
Re: Automatically add "forced" to new name?
Posted: 18 Dec 2016, 09:30
by Biff
Thank you very much.
When I add this
Code: Select all
I:\Eigene Dateien\Videos\Filme\{n.replace(':', ' -')} ({y}){' CD'+pi}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}\{n.replace(':', ' -')} ({y}){' CD'+pi}{'.'+lang}{tags}{file.path =~ /Kinofassung/ ? '[Theatrical Cut]' : ''}fn.match(/.forced/)
it is renamed to:
And adding this - .<lang>-forced.<ext> - adds "-forced" to all of the renamed files.
How could I correct it?
Very many thanks again
Re: Automatically add "forced" to new name?
Posted: 18 Dec 2016, 16:43
by rednoah
I've replied to your questions slightly less than 150 times and yet you're still struggling with the basics. Evidently, if I make it too easy you'll just copy and paste the solution and never think why or how that solution works.
This is clearly Groovy code, not something you want to literally have in your output path:
Format Expressions use
{...} to separate Groovy code sections
(where you can use variables and functions) from literal sections.
It's not that hard. There's plenty of examples here in the forums. If you play with it for a few minutes you will figure it out.
@see
viewtopic.php?f=5&t=1895
Re: Automatically add "forced" to new name?
Posted: 28 Dec 2016, 00:07
by Biff
Thank you very much for the link. And sorry for causing almost 150 replies.
Well, yes, the brackets. It appears to work great now.
Many thanks again