Error in the suball script

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
doopsuiker
Posts: 2
Joined: 06 Jan 2015, 22:35

Error in the suball script

Post by doopsuiker »

Hi!

Since updating to the latest version, I can't use the "get-missing-subtitles -r" command anymore. When trying to use the suball script instead, I found a bug.

My (very basic) .bat file goes like this:

Code: Select all

filebot "E:\Series" -script fn:suball --lang en -non-strict
It works good for most folders/files, but when there is a folder with media files and also a subfolder with media files, filebot only downloads subtitles for the media files in the folder, not for the media files in the subfolder. This wasn't the case with the old "get-missing-subtitles -r" command.

Could you please help me change the suball script, so it can also download subtitles for media files in the subfolders?
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

If you can give me all the file paths as text I will have a look at it.
:idea: Please read the FAQ and How to Request Help.
doopsuiker
Posts: 2
Joined: 06 Jan 2015, 22:35

Re: Error in the suball script

Post by doopsuiker »

I have

Code: Select all

"E:\Series\Boardwalk Empire"
with

Code: Select all

"E:\Series\Boardwalk Empire\Boardwalk.Empire.S05E02.720p.HDTV.x264-KILLERS"
and

Code: Select all

"E:\Series\Boardwalk Empire\Boardwalk.Empire.S05E03.720p.HDTV.x264-KILLERS"
as subfolders.

The other files in the "Boardwalk Empire" folder get subtitles, but not in the subfolders
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

So you have some episode files in the "Boardwalk Empire" folder but also some episode files have their own folders? That's kinda odd and inconsistent. I recommend using a standard {n}/{'Season '+s}/{n} - {s00e00} - {t} structure. Or you can make episode folders for all episodes and that should work as well.
:idea: Please read the FAQ and How to Request Help.
hharold
Posts: 4
Joined: 28 Mar 2014, 07:46

Re: Error in the suball script

Post by hharold »

Hi,

Since the switch from -get-missing-subtitles to fn:suball all my tvshow path are excluded, and no subtitles seem to get downloaded anymore:

Synology> filebot -script fn:suball /volume1/tvshow/ --lang nl --output srt --encoding utf8 --db opensubtitles -non-strict
Exclude: /volume1/tvshow/Allo Allo/Season 1
Exclude: /volume1/tvshow/Celblok H/Season 2
Exclude: /volume1/tvshow/Criminal Minds/Season 10
Exclude: /volume1/tvshow/CSI Crime Scene Investigation/Season 13
etc, etc,...

most folders contain MKV files of about 1GB, most without subtitles embedded.,

Any ideas ?

cheers,
Harold
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

Here's the docs:
viewtopic.php?f=4&t=5&p=8871#p8871

A quick look at the (very easy to read) code might help to see which rule causes files to be excluded.
:idea: Please read the FAQ and How to Request Help.
hharold
Posts: 4
Joined: 28 Mar 2014, 07:46

Re: Error in the suball script

Post by hharold »

I think the reason is that I have installed the portable version on my Synology, which does not include MediaInfo.
Therefor the checks with the getMediaInfo component fail, and it ignores all files.

If I edit the suball.groovy, remove the two getMediaInfo lines and call it locally, the script succeeds.

Cheers,
Harold
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

Since you seem to be calling the script on your entire structure, and you're probably doing this repeatedly, I highly recommend setting --def maxAgeDays=7 or risk getting banned.

What version of FileBot are you using? Missing MediaInfo won't cause files to be ignored, that condition just won't work, at the very least if you use the latest via filebot -script dev:suball ;)
:idea: Please read the FAQ and How to Request Help.
hharold
Posts: 4
Joined: 28 Mar 2014, 07:46

Re: Error in the suball script

Post by hharold »

My current version is:
FileBot 4.5.3 (r2729) / Java(TM) SE Embedded Runtime Environment 1.8.0 (headless)

With the 'online' suball script, all folders still appear as Exclude :
filebot -script dev:suball /volume1/tvshow --def maxAgeDays=7 --lang nl --output srt --encoding utf8 --db opensubtitles -non-strict

...
Exclude: /volume1/tvshow/The Blacklist/Season 02
Exclude: /volume1/tvshow/The Game (2014)/Season 1
Exclude: /volume1/tvshow/The Good Wife/Season 4
Exclude: /volume1/tvshow/The Good Wife/Season 5
Exclude: /volume1/tvshow/The Good Wife/Season 6
Exclude: /volume1/tvshow/The Knick/Season 1
Exclude: /volume1/tvshow/True Detective/Season 1

...etc...

Folders are containing episode in .mkv format, mostly > 800MB.

The script part which currently exludes all folder is the part which says "ignore files that are too short" (minLengthMS)
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

Does it work if you pass --def minLengthMS=0 along?
:idea: Please read the FAQ and How to Request Help.
hharold
Posts: 4
Joined: 28 Mar 2014, 07:46

Re: Error in the suball script

Post by hharold »

Thanks !

indeed that works, now I am able to successfully execute the 'online' script.
So it does get a false 'LengthMS'

What does this 1000L parameter mean it the suball script?

Cheers Harold
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

Make sure it's a long so we don't run into int overflow issues :geek:

@see http://stackoverflow.com/a/770017/1514467
:idea: Please read the FAQ and How to Request Help.
terra17
Posts: 47
Joined: 06 Sep 2014, 11:10

Re: Error in the suball script

Post by terra17 »

Hi, since a couple of days I have the same "Exclude" problem with my always-working script ... why ???

this is the script with the above tricks by rednoah

filebot -script dev:suball '/volume1/torrent/SerieTV/' \
-r \
-non-strict \
--lang it \
--def maxAgeDays=7 \
--def minLengthMS=0 \
--log-file '/volume1/torrent/subtitle.log' \
--output srt \
--conflict override

This is the log


Exclude: /volume1/torrent/SerieTV/Fortitude.S01E01.Episode.One.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Exclude: /volume1/torrent/SerieTV/Fortitude.S01E02.Episode.Two.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Done ヾ(@⌒ー⌒@)ノ
Exclude: /volume1/torrent/SerieTV/Fortitude.S01E01.Episode.One.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Exclude: /volume1/torrent/SerieTV/Fortitude.S01E02.Episode.Two.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Done ヾ(@⌒ー⌒@)ノ
Exclude: /volume1/torrent/SerieTV/Fortitude.S01E01.Episode.One.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Exclude: /volume1/torrent/SerieTV/Fortitude.S01E02.Episode.Two.1080p.WEB-DL.AAC2.0.H.264-BS[rarbg]
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Error in the suball script

Post by rednoah »

If things get excluded then one of the exclude conditions applies. See the script code for details as to what these conditions are exactly.
:idea: Please read the FAQ and How to Request Help.
Post Reply