Page 1 of 1

Help with FileBot and Hazel please !

Posted: 06 Feb 2015, 14:36
by magefesa
Hi !
I m trying to recover subs via Hazel using this command :

filebot -get-subtitles "$1" --lang en --output srt --encoding utf8 -non-strict

All gets ok, but i need to know if the subtitle has been found or not, i mean, when a sub is not found i need a command flag "false" or "0" return, and actually it returns a a large string "No matches found:xxxxxxxx"

Could somebody help me ??

The idea is to do something like this in Sheel script and Hazel :

k=$(filebot -get-subtitles "$1" --lang en --output srt --encoding utf8 -non-strict)

if ($k=0) then
exit 1
else
exit 0
fi

Thanks in advance !

Re: Help with FileBot and Hazel please !

Posted: 20 Feb 2015, 00:49
by rednoah
I guess you could simply have your shell script parse the output and then return the appropriate error code for Hazel.