I love this topic. LOL
I am sure there is some very simple way to do what I want. Maybe a text file read from the Format line... I got my FB to fix the SDH issue.
Code: Select all
{subt} {fn =~ /eng-SDH/ ? null : { fn =~ /sdh/ ? '-SDH' : null }}
So if the files are badly named (99% of all files are named in a very bad format I have found) Filebot can fix them...THANK YOU!!!!
Anyway, the reason for my post today: I want to upgrade my format to include other issues with obtained file names for subs. An example from a movie I just got:
Code: Select all
Bahasa Indonesia [Forced].ind.srt
Bahasa Indonesia.ind.srt
Bahasa Malaysia.may.srt
Deutsch [Forced].ger.srt
Deutsch.ger.srt
English [Forced].eng.srt
English.sdh-eng.srt
And on and on for almost 60 language files. Some of which Filebot subt doesn't even recognize (which is fine honestly as they are probably spoken by 10 people on some 1-mile square island somewhere - for example: Euskara.baq.srt and Galego.glg.srt)
So back to my desire and issue. With my code that works, I want to expand it to include some of these other issues. FORCED for one. Also, I noticed that in my code if the original file contains sdh and not SDH the case is not dealt with and thus it chooses null. Sort of a pain but not really as 99% of the files I have found are wrongly labeled but do use the capitalized version of SDH.
I have tried several versions of code but I get errors with every one.
Code: Select all
{fn =~ /Forced/ ? '-forced' : {fn =~ /sdh/ ? '-sdh' : {fn =~ /eng-sdh/ ? null}}}
Oddly enough this give an unexpected input "}" error. And if I remove one of those I get Missing Token "}" error. This makes me laugh but doesn't help me to know where the issue is. Can't I embed the commands? I mean, this is an 'IF X THEN Y ELSE Z" Embedded making it continue the search for the data we want: "IF X THEN Y ELSE IF C THEN D ELSE IF A THEN B ELSE Z" I think I am thinking of this the right way. I did so much of this type of testing when I used to do coding (back in the 80's and 90's) but it has been that long since I did this stuff regularly.
As stated above, I would love if this type of stuff is available in a text file, much as I use for fixing certifications
Code: Select all
{any{csv('S:/replacecert1.csv').get(certification)}{certification}{"NR"}
This would allow me to just write and add to a text file for all the stupid abominations I find in how others name their files.
I hope that this makes sense.