Page 1 of 1

[Script] Filebot

Posted: September 13th, 2014, 9:40 pm
by m3th1dz
Here is a bash script that I wrote for using filebot to process finished downloads.

After finished downloading it moves the file to the show/movie folder fetches artwork and subtitles, updates plex & xbmc, sends a pushover notification when it completes and then deletes any files/folders left behind. You can learn more about filebot here filebot.sourceforge.net

Code: Select all

#!/bin/bash
 
# SABnzbd Post Processing Script - www.Filebot.net "AMC" Script
 
FILE_PATH=$1
FILE_NAME=$3
 
filebot -script \
   fn:amc \
   --output "/path/to/your/media" \
   --log-file amc.log \
   --action move \
   --conflict override -non-strict \
   --def music=n \
   --def xbmc=127.0.0.1 \
   --def plex=127.0.0.1 \
   --def pushover= \
   --def artwork=y \
   --def subtitles=en \
   --def clean=y \
   --def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|part01|part02|par1|par2" \
   --def "terms=sample|trailer|etc" \
   --def "ut_dir=$FILE_PATH" \
   --def "ut_kind=multi" \
   --def "ut_title=$FILE_NAME"
Download Script: http://pastebin.com/cmRVkhwY

Re: [Script] Filebot

Posted: December 16th, 2014, 11:18 am
by caisley69
hey i have filebot and i am wanting to use this to auto process. do i add this into a text file when what. i would like this to do both movies and tv shows i find that sb and cp don't always work correct. thanks for any help

Re: [Script] Filebot

Posted: December 22nd, 2014, 9:33 am
by magiin83
I've had some issues with this script (though I've made some changes to it.)

It seems I can't get the xbmc command to go through, and I've seen the error mentioned in a lot of different forums, but the way to solve it doesn't seem to be working for me.

The error is:

Code: Select all

/usr/bin/filebot: line 15: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
"-" is not a valid option
I've reset my locale on xbmc, doesn't fix it.
I've added --encoding UTF-=8 \ to the script, also doesn't fix it.
I'm not sure where else to go with this, but I also haven't seen any updated scripts that use SAB integration with XBMC... can anyone point me in the right direction if there is a more up-to-date one?

Here is my current script. I also don't know whether I need to include username/pass for xbmc and the port in order for the update to go through, but since I can't even make it that far, I'll worry about that next.

Code: Select all

#!/bin/bash

# SABnzbd Post Processing Script - www.Filebot.net "AMC" Script

FILE_PATH=$1
FILE_NAME=$3

filebot -script \
   fn:amc \
   --output "/mnt/user" \
   --log-file amc.log \
   --action move \
   --conflict override -non-strict \
   --def music=n \
   --encoding UTF-=8 \
   --def xbmc=192.168.1.17 \
   --def clean=y \
   --def "exts=jpg|nfo|srv|srr|nzb|sfv|idx|sub|txt|part01|part02|par1|par2|info|com|db|md5|1|jpeg|url|lnk|html|ini|bat|com|exe|scr|sample" \
      --def "movieFormat=Movies/movieFormat=mnt/user/Movies/{n.replaceAll(/[:|]/, " - ").upperInitial().space('.')} ({y})/{n.replaceAll(/[:|]/, " - ").upperInitial().space('.')} ({y}){'-CD'+pi}.{vf}.{vc}.{ac}" \
   --def "ut_dir=$FILE_PATH" \
   --def "ut_kind=multi" \
   --def "ut_title=$FILE_NAME"