-get-missing-subtitles bug?

All your suggestions, requests and ideas for future development
Post Reply
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

-get-missing-subtitles bug?

Post by Hematot »

Hi,
after updating to v2.61 today my existing subtitles stopped to be recognized by FileBot.
Example:
a media folder might contain the following:

mediafile1.mkv
mediafile1.srt
...
...
mediafileX.mkv
mediafileX.srt
...
mediafileY.mkv


I'm running FB in command line mode from a batch script. For each existing video file I make a -get-missing-subtitles call to filebot.
In the list above mediafileY.mkv would then trigger a download of mediafileY.eng.srt. For various reasons my script then removes the .eng part of the extension.
So far that has been working fine but today filebot downloaded new subtitles for all media files that didn't have a subtitle file with the .eng part in the extension.
.srt only wasn't recognized as an existing subtitle.

Personally I could get around the problem of having .eng in the name but before starting to fix that I would like to check if it's just a small bug?

Another subtitle related question:
Is it possible to choose whether or not to download HI subtitles?

Thanks for a great piece of software!
/D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: -get-missing-subtitles bug?

Post by rednoah »

1. 2.61 supports downloading missing subtitles per language. e.g. Download missing French subs when there are English ones already there. So that behaviour just changed. Without .eng it doesn't know which language it is and download the requested language again.

2. No support for HI because it requires me to support that in all subtitle engines. Possible but far for a priority to me.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: -get-missing-subtitles bug?

Post by Hematot »

OK,
so if I add "--lang sv en"/ "--lang sv, en"/ "--lang sv --lang en" to the parameters filebot would attempt to download both Swedish and English subtitles?
Or separate calls for each language?

Thanks
/D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: -get-missing-subtitles bug?

Post by rednoah »

Seperate calls for each language. But subs of different languages won't interfere with each other.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: -get-missing-subtitles bug?

Post by Hematot »

Okidoki,
then I'll get right at it and update my command files.

Don't know if it's ok to ask in this thread but I'm having a bit of trouble with running filebot from a bat file (win7 x64):
In my first attempts calling filebot terminated the whole batch file on most occasions (I think that some for loops managed to call filebot more than once, very uncertain about this though).
Checking with errorlevel or moving the filebot calls to subroutines didn't help so i ended up with putting the filebot calls in a couple of separate bat files who in their turn are called from the main bat file.
Then when filebot terminates the "suroutine" bat file the control goes back to the main bat file.
This actually works, however it's a bit untidy so it disturbs me a bit... Also I don't understand why this is happening and that doesn't do it better...
I guess that you've concluded from my questions that I'm not very good at this (to say the least) and need to do a bit if homework on batch scripting in general and filebot in particular.
However, I'm stuck at this stage so if you have any tips on how to call filebot without it terminating the calling batch file that would be appreciated!

Cheers
/D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: -get-missing-subtitles bug?

Post by rednoah »

FileBot should exit with proper success/error exit codes but then what happens in windows batch scripts I also got no clue.

You should really check into FileBot/Groovy scripting. I bundle a whole Groovy script interpreter just because batch scripting (esp on windows!) suckz so bad for even the simplest programming tasks.

Apart from that, try doing "cmd /c program", that spawn a new cmdshell doing a given cmd and exiting. Might be what you're looking for, or might not. In anycase, if you need any control structure like if/loop you really should just do it with FileBot/Groovy and save you a lot of headache.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: -get-missing-subtitles bug?

Post by Hematot »

Yeah,
tried Groovy...
This is almost exactly what I want to do: Sort out TV Download Folder (http://filebot.sourceforge.net/forums/v ... =4&t=5#p52) but it wouldn't work.
Ended up with tons of java errors if I remember right, whatever it was I never could penetrate the problem let alone solve it...
I've actually (believe it or not) done some Java programming using Eclipse (a judo timer/scoreboard interfacing an excel database) but checking the Groovy website made me back off really quick...
To me that felt far far too complicated for scripting, so I never really gave it much time. Sorry.

If you want to, I could post my batch scripts when I'm happy with them if there are any other poor souls out there who couldn't get their head around Groovy scripting?

Coming back to the original subject of this thread: I just noticed that the rename function doesn't honor the "language flag" in the subtitle file name.
Moving/rename "mediafile1.eng.srt" would result in a new filename of "mediafile.srt". Two different languages results in a conflict.
Changing the naming scheme for your media files would result in (having to) download all subtitle files...
I understand how this happens but shouldn't the "flag" be kept?

Later
/D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: -get-missing-subtitles bug?

Post by rednoah »

The shared scripts should work put of the box. At most you might have to adjust the paths in the script match your system. Learning basic Groovy is definitely easier then learning basic shell scripting. ;) If you learn about how to call functions, do if/then/else and loops you probably already know everything you need. Since you have some Java experience it should be very very easy for you to hook up some basic script for your needs.

Well, -rename and -get-subtitles are two completely different things. In -rename more --language is used to localise episode data. How things are named is completely up to the naming scheme, thus up to each users preferences / needs.

=> Just add

Code: Select all

{'.'+lang}
to your naming scheme. Itll add .eng to to subtitles names.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: -get-missing-subtitles bug?

Post by Hematot »

Thanks rednoah!
The {'.'+lang} did the trick, worked fine with both English and Swedish subtitles (and it could be used for renaming the video file as well without messing it up!).

I'll just add some filebot movie renaming functionality to my script and then I'll try to give Groovy another go; maybe I had a bad day last time...

Thanks for the help!
/D

(I'll probably get back with a lot of Groovy questions...)
Post Reply