Search found 48 matches

by Zignature
10 Jun 2016, 00:21
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

The suball script has options for only download subs for files that are older than a certain amount of time. Setting minAgeDays to 3-4 days should be good enough.

Some good info here: https://www.filebot.net/forums/viewtopic.php?f=4&t=5#p8871

I tried the other auto-subliminal script, but kinda ...
by Zignature
07 Jun 2016, 19:13
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

You could always setup a scheduled task on your machine to run Filebot to check for missing subtitles
by Zignature
07 Jun 2016, 19:08
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

Hi, it may well happen that when sonarr finds a new episode, the subtitle is not already available, so, How would I force the script to retry after a while?

I wouldn't know at the moment :(
I have Sonarr setup to download episodes only if they're 7 days old. This way chances are better to find ...
by Zignature
07 Jun 2016, 19:05
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

Hello,
Tried this with sonarr, it downloaded subtitle all right. But it appended _eng.srt to the subtitle which doesn't exactly match the video file name because of extra "eng" in the sub srt file (e.g. Mr. Robot - S01E05 - eps1.4_3xpl0its.wmv. eng .srt)

so I changed the following to:
[it ...
by Zignature
06 Jun 2016, 05:46
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

The script has to append the language code to the filename, because it's possible to search for multiple languages. Imagine you want both English and Dutch subtitles...

Does the ".eng" in the filename cause any problems for you?
by Zignature
03 Jun 2016, 17:42
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

in the version on my pc I also pass a variable to determine which ISO 639 version to use, and then use a switch to set it.

Code: Select all

--def iso639=<1|2|3>
by Zignature
28 May 2016, 19:01
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

Re: [SCRIPT] Automated multilingual subtitle grabber for Son

Since I don't have a Linux or Mac system, perhaps someone could tell me the path settings for Filebot on those systems.
Path settings for XPenology would also be greatly appreciated :)
by Zignature
28 May 2016, 18:57
Forum: Scripting and Automation
Topic: [SCRIPT] Automated multilingual subtitle grabber for Sonarr
Replies: 25
Views: 32216

[SCRIPT] Automated multilingual subtitle grabber for Sonarr

Custom script for Sonarr for automated multilingual subtitle downloading.
This script uses Filebot to search for missing subtitles by hash in the given language(s) and
saves the file with ISO 639-2/B language code(s).
This is handy for Plex users for instance, since Plex doesn't support ISO 639-3 ...
by Zignature
28 May 2016, 17:25
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

Ok. Actually I could give the parameter any name. The word mode just sprung to mind :)

But would that script work as I modified it?

If I use --def mode=d method, how would I refer to it in the script? Same way eg. _args.mode?
by Zignature
28 May 2016, 17:15
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

What if I added a parameter eg. --mode, with 'd' meaning download and 'u' meaning upgrade.
Then the full argument would read: -script "E:\Scripts\sonarr-subber.groovy" --lang nl,en --mode d

Would this be feasible?

// select mode, download or upgrade
def mode = _args.mode as String

// select ...
by Zignature
28 May 2016, 16:43
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

does the --conflict parameter do anything for getMissingSubtitles()?

In case Sonarr downloads an upgrade for an episode, a new subtitle needs to be downloaded and then a conflict may occur.
Or should I use getSubtitles() instead for that?
by Zignature
28 May 2016, 16:30
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

Since Sonarr sends environment variables, I simplified the setup for Sonarr skipping the batch file.

It now sends the following arguments straight to Filebot.exe:
-script "E:\Scripts\sonarr-subber.groovy" --lang nl,en

sonarr-subber.groovy:

// select input language(s)
def languages = _args.lang ...
by Zignature
27 May 2016, 16:41
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

Awesome!

Man I really need to do a course in Groovy... You make it look so easy and I really don't have a clue about this stuff :D
by Zignature
27 May 2016, 12:06
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

By the way, is it possible to search multiple languages in one go? For instance if you feed a list of language codes like "nl,en,fr"?
Using eachWithIndex perhaps?
by Zignature
27 May 2016, 11:58
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

Did some quick research. Plex only supports ISO 639-1 and ISO 639-2B language codes... :geek:

I posted a Feature Request: http://forums.plex.tv/discussion/219591 ... -3-support :twisted:
by Zignature
27 May 2016, 11:29
Forum: Scripting and Automation
Topic: NOOB - rename MOVIES and find english subs
Replies: 10
Views: 11022

Re: NOOB - rename MOVIES and find english subs

vanhouten035 wrote:-get-missing-subtitles doesn't work for me when I have every movie in a separate folder. Is there anyway to let this command look into each folder?
if you feed it the top directory it should search subtitles for all video files in all subdirectories
by Zignature
26 May 2016, 18:38
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

Awesome, thanks!

Plex only seems to have problems with "nld" for Dutch. "nl" works fine, I haven't tried "dut" yet.
by Zignature
26 May 2016, 14:44
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

Re: [help] get a subtitle for a specific video file with scr

There's a big demand for an automated subtitle downloader in the Sonarr community, so I thought I'd give it a go.
And I just like it that a subtitle will be downloaded immediately when Sonarr imports an episode :)

Somehow my Plex server doesn't seem to handle subtitle files with "nld" as the Dutch ...
by Zignature
26 May 2016, 12:14
Forum: Scripting and Automation
Topic: [help] get a subtitle for a specific video file with script
Replies: 18
Views: 12704

[help] get a subtitle for a specific video file with script

I'm trying to create a post-processing script for Sonarr.
Everytime a video is downloaded the scipt is supposed to download the correct Dutch subtitle.

I already got something going, but it seems the script is checking all files in the directory instead of the specific video file.

I also can't ...
by Zignature
25 Feb 2015, 16:53
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

Although the script ran and did what it had to do, I got an error:

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.


Found the solution over here: http://www-01.ibm.com/support/docview.wss?uid ...
by Zignature
25 Feb 2015, 16:17
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

Hahaha lmao. Told ya I'm a noob :P

But seriously, I should've caught that one.
by Zignature
25 Feb 2015, 13:28
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

It's a bit unwieldy but I got it done!


Extracted Filebot.jar
Edited "/net/filebot/Settings.properties". I added the line script.pi: http://filebot.plugins.local/%s.groovy
Packed everything to Filebot.jar
Made a backup of the original Filebot.jar
Copied the newly created Filebot.jar to the ...
by Zignature
25 Feb 2015, 12:54
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

Just found out. It needs to be a url
by Zignature
25 Feb 2015, 12:11
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

Does it need to be a url or is also possible to add a local path e.g. c:\scripts ?
by Zignature
25 Feb 2015, 11:34
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

I think it would be a feature for CLI people. Not for GUI people.
I think GUI people don't bother checking folder structure so they won't notice :P
by Zignature
25 Feb 2015, 10:24
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

Re: [REQUEST] Plugins/Scripts folder

Thanks rednoah :)

A new challenge arrived... Finding out how to get into Filebot.jar to edit Settings.properties 8-)
by Zignature
25 Feb 2015, 02:11
Forum: Scripting and Automation
Topic: [SCRIPT] Download subtitles and merge/remux into MKV container
Replies: 2
Views: 5772

[SCRIPT] Download subtitles and merge/remux into MKV container

Batch download Dutch subtitles and merge/remux them into a Matroska video container (MKV)

License:
This script is free for everyone to use or edit. Just don't sell it :P

Requirements:

Windows operating system (for now)
sub-merge-mkv-groovy.bat (included in zip file)
sub-merge-mkv.groovy ...
by Zignature
25 Feb 2015, 01:26
Forum: Feature Requests and Bug Reports
Topic: [REQUEST] Plugins/Scripts folder
Replies: 9
Views: 6404

[REQUEST] Plugins/Scripts folder

I'd love to have a plugins/scripts folder where one can put third party plugin scripts that could then directly be used in CLI instead of putting the path in.

e.g.
filebot -script myscriptname arg1 arg2
instead of
filebot -script "C:\my\path\to\myscriptname.groovy" arg1 arg2

Does that make any ...
by Zignature
24 Feb 2015, 02:18
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

I think I finally did it. It took me the better part of the day and I suspect, being a noob at this, the code could be cleaner.

sub-mkv.groovy:

// filebot -script "path\to\sub-mkv.groovy" "<path\to\folder>"

args.getFiles().findAll { getMediaInfo(file:it, format:'{ext}')=='mkv' }.each {
def ...
by Zignature
22 Feb 2015, 20:56
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

Well I'm able to get all MKV files but that's it. I'll stick to my batch file :)
I really do not have a clue on how to execute another program (mkvmerge.exe in this case) from a groovy script.

This stuff is too difficult for me to grasp :?


// filebot -script findmkv.groovy <folder>

args ...
by Zignature
22 Feb 2015, 12:59
Forum: Scripting and Automation
Topic: Make AMC ignore some torrents
Replies: 7
Views: 4973

Re: Make AMC ignore some torrents

how would one apply multiple folders?

Code: Select all

--def "ignore=testfolder1, testfolder2"
or

Code: Select all

--def "ignore=testfolder1" --def "ignore=testfolder2"
or

Code: Select all

--def "ignore=testfolder1" "ignore=testfolder2"
by Zignature
21 Feb 2015, 17:18
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

And this is the result:

sub-mkv.bat for finding and merging Dutch subtitles for MKV videos

@ECHO OFF &SETLOCAL disableDelayedExpansion

SET /p rootfolder=Enter The Root folder path:%=%
ECHO the root folder path is: %rootfolder%
ECHO.
ECHO Enumerating all MKVs under %rootfolder%
REM loop through ...
by Zignature
19 Feb 2015, 18:42
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

I just figured out how to parse the output. In case anyone else wonders, here's the code:


FOR /f %%a IN ('filebot -get-subtitles "C:\video.mkv" --lang nl --output srt --encoding utf8 ^| FIND /c /i "Writing" ') DO (
IF [%%a]==[0] (
ECHO Subtitle not found
) ELSE (
ECHO Found subtitle!
)
)
by Zignature
19 Feb 2015, 17:50
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

Thanks a bunch!

I already figured out how to read the output into a variable e.g.

Code: Select all

filebot [parameters] > fboutput.txt
SET /p fboutput = < fboutput.txt
by Zignature
19 Feb 2015, 17:36
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

I can of course check for the existence of the subtitle file using IF EXIST but I think it would be cleaner and faster to use exit codes or anything else within the code.
Parsing the output sounds feasible.

So how do I refer to the output? Can I write the output to a variable? Like I said, I'm a ...
by Zignature
19 Feb 2015, 12:03
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

Re: How to check whether a subtitle was found and downloaded

This the basic logic:


find subtitle in mkv
if not found {
search for subtitle
if not found {
do nothing
} else {
merge subtitle into mkv
}
} else {
is Dutch subtitle?
if not Dutch {
search subtitle
if not found {
do nothing
} else {
merge subtitle into mkv
}
} else {
do nothing ...
by Zignature
19 Feb 2015, 11:49
Forum: Scripting and Automation
Topic: How to check whether a subtitle was found and downloaded
Replies: 13
Views: 7676

How to check whether a subtitle was found and downloaded

Hi folks,

I'm a newbie when it comes to writing batch files and using command line filebot.

I'm trying to create a batch file that is supposed to check for embedded subtitles using mkvmerge. If embedded subtitles are found, it checks whether there are Dutch subtitles.
If there are no Dutch ...