Page 1 of 1

Windows amc scripting help

Posted: 25 Dec 2015, 11:00
by jaydz
Hello Everyone!

Im using this script to move my downloaded series and movies and to download subtitles for it.
I want to download English and Dutch subtitles. This script also renamed nld or nl to dutch so plex recognizes it.
http://pastebin.com/DSKkqw3C

It doesnt download any subtitles. it just skips the files. I've read some topics on FileBot who have the same problem but Idk. :s
how can I solve this? :s // https://gyazo.com/098113db012e7c50f3fc985bbf639f07

Thanks Guys!

Edit: I have deleted all SRT files in this folder and it downloaded subtitles for one file, the size was just like all others, so weird..

Re: Script

Posted: 25 Dec 2015, 11:40
by rednoah
1.
You can get away with much fewer filebot calls.

e.g. multiple arguments:

Code: Select all

filebot -script fn:suball --lang nl "D:\Movies" "D:\TV Series"
e.g. better replace pattern:

Code: Select all

filebot -script fn:replace --action move --conflict override "D:\Movies" "D:\TV Series" --def "e=.(nld|nl).srt" "r=.dutch.srt"

2.
Moreover, it's much better to call suball before the amc script, so that the amc script can process the subtitle files alongside the video files.

e.g. format subtitles with .LanguageName syntax:

Code: Select all

TV/{n}/{n} - {s00e00} - {t}{'.'+lang.name}
So 1 suball and 1 amc call can easily achieve what you're doing with 8 calls. ;)

Re: Script

Posted: 25 Dec 2015, 11:53
by jaydz
rednoah wrote:1.
You can get away with much fewer filebot calls.

e.g. multiple arguments:

Code: Select all

filebot -script fn:suball --lang nl "D:\Movies" "D:\TV Series"
e.g. better replace pattern:

Code: Select all

filebot -script fn:replace --action move --conflict override "D:\Movies" "D:\TV Series" --def "e=.(nld|nl).srt" "r=.dutch.srt"

2.
Moreover, it's much better to call suball before the amc script, so that the amc script can process the subtitle files alongside the video files.

e.g. format subtitles with .LanguageName syntax:

Code: Select all

TV/{n}/{n} - {s00e00} - {t}{'.'+lang.name}
So 1 suball and 1 amc call can easily achieve what you're doing with 8 calls. ;)
Thank you very much Rednoah, appreciate it!
I still have the problem though that it skips files and doesnt download subtitles for most of them :S
This is a error I got btw, im running it from a batch file on my desktop as always:

Code: Select all

C:\Users\Administrator\Desktop>"C:\Program Files\FileBot\filebot.exe" filebot -script fn:suball --lang nl "D:\Movies" "D:\TV Series"
NoSuchFileException: C:\Users\Administrator\Desktop\filebot
java.nio.file.NoSuchFileException: C:\Users\Administrator\Desktop\filebot
        at net.filebot.cli.ScriptShellMethods.getMediaFolders(ScriptShellMethods
.java:156)
        at net.filebot.cli.ScriptShellMethods.eachMediaFolder(ScriptShellMethods
.java:181)
        at Script1.run(Script1.groovy:50)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
        at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)

        at net.filebot.Main.main(Main.java:169)
Failure (°_°)

Re: Script

Posted: 25 Dec 2015, 11:57
by rednoah
1.
It won't fetch subtitles for files that already have subtitles for that language. If there's a subtitles file that is not correctly language tagged, then FileBot will assume that it is "any language" so no missing subtitles for any language.

2.
You're probably passing in some weird arguments, in this case, a folder called "filebot" relative to your working directory. Don't just blindly copy and paste stuff. ;)

Re: Script

Posted: 25 Dec 2015, 12:03
by jaydz
rednoah wrote:1.
It won't fetch subtitles for files that already have subtitles for that language. If there's a subtitles file that is not correctly language tagged, then FileBot will assume that it is "any language" so no missing subtitles for any language.

2.
You're probably passing in some weird arguments, in this case, a folder called "filebot" relative to your working directory. Don't just blindly copy and paste stuff. ;)
1. But do you know why it doesn't download any subtitles here? It only downloaded for episode 6: https://gyazo.com/fc37ddb2ac10ed7d4597c29b25650909
https://gyazo.com/8f626e2583c066981517bd4752d083ce

2. fixed

Re: Windows amc scripting help

Posted: 25 Dec 2015, 12:07
by rednoah
1.
Delete everything that's not a video file. See what happens. Now continue with trial and error to figure out which files cause it to not download additional subtitles.

2.
Did you read the manual of the suball script, and paid particular attention to default values? Too old, too young, too big, too small, contains embedded subtitles, etc
viewtopic.php?f=4&t=5

Re: Windows amc scripting help

Posted: 25 Dec 2015, 12:35
by jaydz
rednoah wrote:1.
Delete everything that's not a video file. See what happens. Now continue with trial and error to figure out which files cause it to not download additional subtitles.

2.
Did you read the manual of the suball script, and paid particular attention to default values? Too old, too young, too big, too small, contains embedded subtitles, etc
viewtopic.php?f=4&t=5
https://gyazo.com/95255962111601df5c3529eca990d3e8 --> https://gyazo.com/e4654b0a5852ec6d5c1933eb57055226 --> https://gyazo.com/22b162c6663a7268bd443467aee834f7

Its still acting the same, changed my line to this to test:
"C:\Program Files\FileBot\filebot.exe" -script fn:suball --lang nl "D:\TV Series\The Walking Dead\Season 6" --def maxAgeDays=999 minAgeDays=1 minFileSize=0 minLengthMS=0

Re: Windows amc scripting help

Posted: 25 Dec 2015, 12:47
by rednoah
1.
docs wrote:by default, if files contain subtitles of any language, no additional subtitles will be downloaded
Do *.mkv files 1-5 and 7-8 already include English (or any language) subtitles in the mkv container itself?


2.
You probably want to add something like this:

Code: Select all

--def ignoreTextLanguage=nl
Means: download subtitles if mkv does not already contain Dutch subtitles

Re: Windows amc scripting help

Posted: 25 Dec 2015, 14:05
by jaydz
rednoah wrote:1.
docs wrote:by default, if files contain subtitles of any language, no additional subtitles will be downloaded
Do *.mkv files 1-5 and 7-8 already include English (or any language) subtitles in the mkv container itself?


2.
You probably want to add something like this:

Code: Select all

--def ignoreTextLanguage=nl
Means: download subtitles if mkv does not already contain Dutch subtitles

Yea they have english subtitles inside. I added ur '2.' Line and it downloaded some nl subs:
http://pastebin.com/UBAX6nvq awesome

Still weird it didnt find 3 subtitles like episode 8: http://www.opensubtitles.org/nl/search/ ... vie-198630

Re: Windows amc scripting help

Posted: 25 Dec 2015, 19:26
by rednoah
You're not using -non-strict so it's very likely that despite there being some subtitles none of them is considered a good enough match in strict mode.

Re: Windows amc scripting help

Posted: 25 Dec 2015, 20:56
by jaydz
rednoah wrote:You're not using -non-strict so it's very likely that despite there being some subtitles none of them is considered a good enough match in strict mode.
I changed the line to this but it didn't download the other subs:
"C:\Program Files\FileBot\filebot.exe" -script fn:suball --lang nl "D:\Movies" "D:\TV Series" --def maxAgeDays=99999 minAgeDays=0 minFileSize=0 minLengthMS=0 ignoreTextLanguage=nl -non-strict

Re: Windows amc scripting help

Posted: 26 Dec 2015, 07:17
by rednoah
Seems fine:

Code: Select all

Get [Dutch] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
Looking up subtitles by name via OpenSubtitles
Fetching [The.Walking.Dead.S06E08.HDTV.XviD-FUM.srt]
Writing [The.Walking.Dead.S06E08.HDTV.XviD-FUM.srt] to [The Walking Dead - S06E08 - Start to Finish.nld.srt]
Done ヾ(@⌒ー⌒@)ノ