Simple Command Help
Simple Command Help
Hi guys, I'm a new user and just purchased a license on Windows recently.
What i'm looking to achieve:
After finishing renaming files, I want to automatically fetch English subtitles and then move the subs to "\Subs\filename"
Ideally, I'd also like to remove the language parameter from the subs, so it matches the video file name exactly minus extension.
The result should be that all episodes in a TV series are in the \subs\ folder whilst the video files are a level up.
I've tried to do this via a custom post-processing script but I couldn't make it work and I'm not sure if there's an easier way to go about it anyway?
What i'm looking to achieve:
After finishing renaming files, I want to automatically fetch English subtitles and then move the subs to "\Subs\filename"
Ideally, I'd also like to remove the language parameter from the subs, so it matches the video file name exactly minus extension.
The result should be that all episodes in a TV series are in the \subs\ folder whilst the video files are a level up.
I've tried to do this via a custom post-processing script but I couldn't make it work and I'm not sure if there's an easier way to go about it anyway?
Re: Simple Command Help

Console Output: Select all
$ filebot -rename -r /path/to/input --db file --filter "f.subtitle && none{ f =~ /subs/ }" --format "{folder}/subs/{fn.removeAll(/[.][a-z]{2,3}$/)}"
[MOVE] from [Alias.1x01.eng.srt] to [subs/Alias.1x01.srt]

Groovy: Select all
{ source, target ->
if (target.video) {
target.dir.listFiles().each{ f ->
if (f.subtitle && f.isDerived(target)) {
f.move(target.dir / 'subs' / target.nameWithoutExtension + '.' + f.extension)
}
}
}
}
Re: Simple Command Help
You are absolutely insane @rednoah
I cannot believe you made it work that easily. I appreciate it.
I cannot believe you made it work that easily. I appreciate it.
Re: Simple Command Help
Hi @RedNoah, I'm now getting an error, but from the looks of it, it might be some sort of API limit rather than an issue with FileBot?
Console Output: Select all
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Apr 25, 2025 12:25:58 PM net.filebot.subtitle.SubtitleMetrics$5 getSubtitleProperties
WARNING: Failed to read subtitle properties: class java.lang.Double cannot be cast to class java.lang.Float (java.lang.Double and java.lang.Float are in module java.base of loader 'bootstrap')
Re: Simple Command Help
That would be a unintentional internal error on the FileBot side. We can look into that and fix it with the next release. Thanks for the report.Light wrote: ↑25 Apr 2025, 11:34 Apr 25, 2025 12:25:58 PM net.filebot.subtitle.SubtitleMetrics$5 getSubtitleProperties
WARNING: Failed to read subtitle properties: class java.lang.Double cannot be cast to class java.lang.Float (java.lang.Double and java.lang.Float are in module java.base of loader 'bootstrap')[/output]
Not sure about this one. Can you provide more details so that we can reproduce the issue?Light wrote: ↑25 Apr 2025, 11:34Console Output: Select all
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Re: Simple Command Help
Sure. Let me know what else you need to know and I'll do all I can.
This is the full name of the file I tested it on.
This is the preset I was using, but I also tested on default "TheMovieDB - TV"
I was trying to rename the files, and these are the post-processing options I have enabled.

And this is what I can see in the Groovy Pad.
I am successfully authenticated on OpenSubs if that matters.
This is the full name of the file I tested it on.
Format: Select all
Black Mirror - S01E01 - The National Anthem.mkv
Format: Select all
{drive}/{plex}

And this is what I can see in the Groovy Pad.
Groovy: Select all
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Apr 25, 2025 3:16:23 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Re: Simple Command Help
I see. So this error causes subtitles to not be downloaded?
Please do a Clear Cache and then retry to see if that makes a difference:
Please do a Clear Cache and then retry to see if that makes a difference:
Shell: Select all
filebot -clear-cache
Re: Simple Command Help
You are correct in your understanding. It successfully renames the video file but will not fetch subtitles and thus does not move them because they don't exist.
This is the output I got after clearing cache and trying again.
This is the output I got after clearing cache and trying again.
Console Output: Select all
WARNING: Initialize new disk cache: C:\Users\***\AppData\Roaming\FileBot\cache\0
Apr 25, 2025 10:26:31 PM net.filebot.License lambda$verifyLicense$2
WARNING: Activate License [*********] on [Fri Apr 25 22:26:31 BST 2025]
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E02 - Fifteen Million Merits.mkv)
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E03 - The Entire History of You.mkv)
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E01 - The National Anthem.mkv)
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E02 - Fifteen Million Merits.mkv)
Apr 25, 2025 10:26:33 PM net.filebot.ui.rename.PostProcessWorker applyPostProcess
WARNING: net.filebot.web.HttpClientError: https://api.opensubtitles.com/api/v1/download [406 Client Error 406] (F:\TV Shows\Black Mirror\Season 01\Black Mirror - S01E03 - The Entire History of You.mkv)
Re: Simple Command Help
Looks like clearing the cache didn't do anything. Have you perhaps exceeded your quota? If you use the
login button it'll show you the current quota.

Re: Simple Command Help
Yes, I believe so. It seems the limit is 20, so I definitely would have hit it. Strangely, just days prior I remember renaming over 100 files and getting subs for them though... so that is strange.