Here is my guide to install the latest filebot on OSMC.
Tested with a Raspberry 2 and OSMC 2017.02-2 and Filebot 4.7.7
Withi this tutorial will install also media info binding, it is not required but it can be usefull if you want to add extra information to your file names.
The tutorial is based on this tutorial: [GUIDE] Filebot + MediaInfo + Raspberry Pi - FileBot
First we will install all dependencies:
sudo update
sudo apt-get install binutils xz-utils libjna-java mediainfo
Then add debian backports to your sources list to instal openjdk 8
sudo nano /etc/apt/sources.list
Add this line to the end of the file (this is for debian jessie, if you have another version check Instructions)
deb http://ftp.debian.org/debian jessie-backports main
Then install openjdk 8 headless
sudo update
sudo apt-get -t jessie-backports install openjdk-8-jdk-headless
Ok now we will start with the proper filebot installation
mkdir /tmp/filebot && cd /tmp/filebot
Download filebot lastest version from: FileBot - Browse /filebot at SourceForge.net
It must be the noarch ipk, you can use wget with the sourceforge link or download and upload using ftp to /tmp/filebot
ar -x filebot_4.7.7_noarch.ipk
xz -d data.tar.xz
tar xvf data.tar
sudo cp -rf opt/ /
Now you have installed filebot on /opt/share/filebot lets go for media info.
For media info we need jna 4.0.0 but the jna version provided with openjdk is 3.2.7 so we will update it first.
mkdir /tmp/jna-4.0.0
cd /tmp/jna-4.0.0
wget --no-check-certificate https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.0.0/jna-4.0.0.jar
wget --no-check-certificate https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna-platform/4.0.0/jna-platform-4.0.0.jar
jar xf jna-4.0.0.jar
sudo cp -p com/sun/jna/linux-arm/libjnidispatch.so /usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_4.0.0.so
cd /usr/lib/arm-linux-gnueabihf/jni/
sudo mv libjnidispatch.so libjnidispatch_3.2.7.so
sudo ln -s libjnidispatch_4.0.0.so libjnidispatch.so
cd /usr/share/java
sudo rm jna.jar
sudo cp /tmp/jna-4.0.0/*.jar .
sudo ln -s jna-4.0.0.jar jna.jar
sudo ln -s jna-platform-4.0.0.jar jna-platform.jar
java -jar jna.jar
Ok now we go with the proper mediainfo binding
cd /opt/share/filebot
sudo ln -s /usr/lib/arm-linux-gnueabihf/libmediainfo.so.0 libmediainfo.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/libzen.so.0 libzen.so
And finally we check that everything is installed properly
sudo ./filebot.sh -script "fn:sysinfo"
The result should be something along the lines:
FileBot 4.7.7 (r4678)
JNA Native: 4.0.0
MediaInfo: 0.7.70
Apache Commons VFS: [zip, rar]
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-02-10 (r480)
Groovy: 2.4.7
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 32-bit OpenJDK Zero VM
CPU/MEM: 4 Core / 177 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
Package: IPKG
Data: /opt/share/filebot/data/root
uname: Linux osmc 4.4.27-7-osmc #1 SMP PREEMPT Tue Jan 24 03:38:31 UTC 2017 armv7l GNU/Linux
Done ã¾(ï¼ âã¼âï¼ )ã
If you will be using non english locales in your downloaded files you need to properly configure the locales on the system. Otherwise filebot will not be able to recognise properly the name of your files and will skip them when renaming.
sudo apt-get install locales
sudo dpkg-reconfigure locales
In the first step of dpkg-reconfigure
, you can select all locales (it will take a while to process) or just the ones that you could use.
In the second step, select the default locale according to your usage (es_ES.UTF-8 for spanish pt_BR.UTF-8 for brazilian portuguese etc.)
Then let it recompile the locales you selected in the first step and close your connection and reconnect.
You can now check the locale in use with locale
.
Also remember to check from time to time for filebot updates.
The script I am using for renaming all my transmission files is like this:
#!/bin/sh
DATE_STAMP=` date +%d-%m-%Y-%T`
echo ${DATE_STAMP}
FILEBOT="/opt/share/filebot/filebot.sh"
COMPLETED="/media/Seagate Expansion Drive/Completed/"
DESTINATION="/media/Seagate Expansion Drive/"
LANG="--lang es"
ACTION="--action copy"
CONFLICT="--conflict skip"
SCRIPT="-script fn:amc"
DEF="--def reportError=y music=y excludeList=amc.excludes gmail=<yourUser>:<yourpassword> kodi=127.0.0.1:8080"
LOG="amc.log"
"$FILEBOT" $SCRIPT $LANG $ACTION $CONFLICT -non-strict --output "$DESTINATION" ${DEF} "$COMPLETED" --log ALL
DATE_STAMP=` date +%d-%m-%Y-%T`
echo ${DATE_STAMP}
This will copy all files on COMPLETED
to folder under DESTINATION
(TV Shows, Movies…) with a proper name for using with kodi, then it will send you an email with the action and notify kodi to reindex.
The files already processed will be stored on amc.excluded on DESTINATION
to avoid processing the same files twice.
Change the language to your own and modify ACTION
to move if you prefer (I do copy it to keep it seeding for some time), and use your gmail account with an App Password
(Sign in with App Passwords - Google Account Help).
Check AMC script options if you need to change something else: Automated Media Center - FileBot
I hope you find this usefull as it took me some time to get all this working.
Tell me if you have any problem with the instructions and donate to filebot development to keep it getting updates.