Help with FileBot and Hazel

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Help with FileBot and Hazel Fri Feb 06, 2015 10:35 am • 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 !
magefesa
 
Posts: 1
Joined: Sat Apr 12, 2014 6:16 am

Re: Help with FileBot and Hazel Fri Feb 06, 2015 5:04 pm • by Mr_Noodle
You can use $? to access the return code of the last command though this really depends on whether filebot returns something different in this case.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support