Page 1 of 1

Post processing script (ripsubtitles.sh)strange behaviour

Posted: March 19th, 2014, 2:54 am
by Aeronnl
Hi,

I am using Sabnzbd under Ubuntu server, and everything works great except for one thing.
I have a script for extracting the .srt file from a downloaded file (ripsubtitles.sh), and i have set it up in the categories section.
I also have pointed out the folder where the script is located. ( under .Sickbeard scripts, to have everything together)
When a movie finished downloading, the script runs, but when it finishes, the script result screen is empty.
The srt file itself is extracted, but when i choose the srt on my Samsung tv, (running Plex) it shows nothing.
What really strange is that when i run the sript manualy in command line, the srt is also extracted, but after it finishes, it DOES show the subtitle on my tv.
Also, i have set the script for Sickbeard as an "extra script" in the config.ini, and Sabnzbd handles this correctly, it shows up in the script result, and subtitles also show up on my tv.
So there must be something going wrong with sabnzbd handling the scipt or something.

Any help would be highly appreciated.

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 19th, 2014, 3:22 am
by shypike
Are you sure the srt files get the right ownership/access rights?
That's something your script should take care off.

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 19th, 2014, 5:51 am
by Aeronnl
I am fairly new to linux, but the script contains "chmod g+rw".
Is this correct?
It is kind if weird that post processing for Sickbeard is correct though...

http://pastebin.com/yfvveTGq

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 19th, 2014, 8:25 am
by shypike
chmod g+rw,o+r might be needed.
It depends on which user account needs to read and show the subtitles.
SABnzbd can correct the access rights of its final files too, see Config->Folders Permissions.
(Explanation: http://wiki.sabnzbd.org/unix-permissions )

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 19th, 2014, 8:45 am
by Aeronnl
shypike wrote:chmod g+rw,o+r might be needed.
It depends on which user account needs to read and show the subtitles.
SABnzbd can correct the access rights of its final files too, see Config->Folders Permissions.
(Explanation: http://wiki.sabnzbd.org/unix-permissions )
Ok, i Will try chmod g+rw,o+r later in then.
I have set 0777 in the permissions, so that must he correct i think!
I Will post my results tonight!

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 19th, 2014, 2:55 pm
by Aeronnl
shypike wrote:chmod g+rw,o+r might be needed.
It depends on which user account needs to read and show the subtitles.
SABnzbd can correct the access rights of its final files too, see Config->Folders Permissions.
(Explanation: http://wiki.sabnzbd.org/unix-permissions )
Turns out your solution worked! ;D
I've added o+r in the script and now the subs are showing on my tv.
The "script result" window is still empty, which had me thinking it didn't work at first, but i does!
Thnx alot!! :D

Re: Post processing script (ripsubtitles.sh)strange behaviou

Posted: March 20th, 2014, 3:43 am
by shypike
There will only be "script output" if your script produces any diagnostic output.
Good to read that it works now.