.srt file handling
Posted: 03 Jan 2024, 16:39
I wish that someone would come up with a standard format for naming these types of files but apparently, that is never going to happen. So I have a question to hopefully save me, well, I already have no hair to pull out...so (lol). How can I take all these various naming formats and make them so they work with Filebot?
I know that the supposed standard standard is: filename.en_US.srt with lowercase language and uppercase country code. But most don't use the country code unless they are doing subs in say eng_UK, eng_US, eng_IE, etc.... For my library, since my current script doesn't handle it well, I usually just delete most sub files that Filebot thinks are the same after they process. I'd like to change this.
Quick example of what I am looking at now. (and yes, I know Filebot handles them currently, but it's not handling how some are named....like this:)
Movie Folder
- Subs Folder
- English.srt (this is the same as the one in the main folder, just doesn't contain the movie name (yes, I know you know this))
- SDH.eng.srt
- CC.eng.srt
- This Movie.mp4
- This Movie.srt
Using the above I end up with this output:
This Movie.mp4
This Movie.eng.srt
This Movie.eng.srt
This Movie.eng.srt
This Movie.eng.srt
My problem is that now when I click to rename it shows that 3 will be removed. I don't like that but it's simply quicker and easier to just click them into oblivion. However, I usually will rename the SDH files manually to keep them.
I have found that when just using the {subt} at the end of my code it seems to handle the language correctly but not anything else. Well, that's not entirely true. Take the SDH file. The {subt} doesn't like that format. However, if I manually rename it to eng-SDH.srt it handles that perfectly and outputs .eng.SDH.srt
All that to ask how to automate all of that? I guess I could do the text file read to fix SDH.eng > eng.SDH but is that the only way? And I am guessing that code in the script would be:
{any{csv('M:/replacesrt.csv').get(srt)}{srt}{"eng"} } Maybe? And then I guess I would fill that will all the variations I find.
Or, is there a simpler way for Filebot to figure out that sdh.eng is the same as eng.sdh and name it that way? And then what about all the language/country codes. Is there no way for Filebot to handle them better? Or at all? I seem to have the issues like above with several of the languages. Portuguese and Chinese are perfect examples...as is Spanish. They all can have various flavors for various locations.
I guess before anything the question would be what does Filebot want to see and what variations does it spit out?
Greg
I know that the supposed standard standard is: filename.en_US.srt with lowercase language and uppercase country code. But most don't use the country code unless they are doing subs in say eng_UK, eng_US, eng_IE, etc.... For my library, since my current script doesn't handle it well, I usually just delete most sub files that Filebot thinks are the same after they process. I'd like to change this.
Quick example of what I am looking at now. (and yes, I know Filebot handles them currently, but it's not handling how some are named....like this:)
Movie Folder
- Subs Folder
- English.srt (this is the same as the one in the main folder, just doesn't contain the movie name (yes, I know you know this))
- SDH.eng.srt
- CC.eng.srt
- This Movie.mp4
- This Movie.srt
Using the above I end up with this output:
This Movie.mp4
This Movie.eng.srt
This Movie.eng.srt
This Movie.eng.srt
This Movie.eng.srt
My problem is that now when I click to rename it shows that 3 will be removed. I don't like that but it's simply quicker and easier to just click them into oblivion. However, I usually will rename the SDH files manually to keep them.
I have found that when just using the {subt} at the end of my code it seems to handle the language correctly but not anything else. Well, that's not entirely true. Take the SDH file. The {subt} doesn't like that format. However, if I manually rename it to eng-SDH.srt it handles that perfectly and outputs .eng.SDH.srt
All that to ask how to automate all of that? I guess I could do the text file read to fix SDH.eng > eng.SDH but is that the only way? And I am guessing that code in the script would be:
{any{csv('M:/replacesrt.csv').get(srt)}{srt}{"eng"} } Maybe? And then I guess I would fill that will all the variations I find.
Or, is there a simpler way for Filebot to figure out that sdh.eng is the same as eng.sdh and name it that way? And then what about all the language/country codes. Is there no way for Filebot to handle them better? Or at all? I seem to have the issues like above with several of the languages. Portuguese and Chinese are perfect examples...as is Spanish. They all can have various flavors for various locations.
I guess before anything the question would be what does Filebot want to see and what variations does it spit out?
Greg