Page 1 of 2

FileBot on RaspberryPi

Posted: 22 Jul 2016, 20:27
by lepaperwan
EDIT: As mentioned by ajcraig and rednoah, the portable version is actually a better solution to running FileBot on RaspberryPi.

I've seen a bunch of topics on the matter but they all seem fairly complicated, long and for what?

rednoah already provides a noarch package, only noarch is not recognized by dpkg as a valid architecture when running armhf.
However, the package is nearly valid if not for this.

So, for those of you who want to set it up quickly and painlessly, I've adapted the ipk to support a Raspbian-like architecture.
Simply run:

Code: Select all

sudo dpkg -i filebot_4.7_armhf.deb
And you're done!

I repeat, the portable version is actually a better solution but for those of you who want to understand how it could be done, here's the script that will achieve the same result and place the resulting .deb in your home.
Note that this must be run on a raspbian like architecture or a system with the necessary fakeroot and dpkg-deb utilities and will take around 5 minutes when run on the RaspberryPi.

If you need mediainfo support or pcalc support, please install libmediainfo0 or libchromaprint-tools respectively.

Code: Select all

#!/bin/sh

if [ ${#} -lt 1 ]; then
        echo 'This scripts needs you to provide the noarch ipk as its first argument'
        exit
fi

old_pwd="${PWD}"
new_pwd="/tmp/filebot-ipk2deb-$(date +%s)"

mkdir -p ${new_pwd}

ar x "${1}"
mkdir -p ${new_pwd}/DEBIAN
tar xvf control.tar.gz -C ${new_pwd}/DEBIAN
tar xvf data.tar.gz -C ${new_pwd}
rm control.tar.gz
rm debian-binary
rm data.tar.gz

cd ${new_pwd}

# Set the proper architecture for RaspberryPi
sed -i -e 's:noarch:armhf:' DEBIAN/control

# Remove existing dependencies or recommendations
# This may be improved to only extend them but I don't feel like automating that in simple shell script
sed -i -e '/^Depends.*/d' DEBIAN/control
sed -i -e '/^Recommends.*/d' DEBIAN/control
# Add Java as a dependency
# Add mediainfo and fpcalc (provided by libchromaprint-tools) as recommendations
echo 'Depends: java-runtime | java-runtime-headless' >> DEBIAN/control
echo 'Recommends: libmediainfo0, libchromaprint-tools' >> DEBIAN/control

# Replace /opt/bin with /usr/bin which lies in the standard PATH
sed -i -e 's:opt/bin:usr/bin:' DEBIAN/prerm
sed -i -e 's:opt/bin:usr/bin:' DEBIAN/postinst

# Don't set LD_LIBRARY_PATH to use default system lookup
# Move user data in user files to avoid needing sudo to run
sed -i -e '/# add APP_ROOT to LD_LIBRARY_PATH/,/fi/d' opt/share/filebot/bin/filebot.sh
sed -i -e 's:APP_DATA=.*:unset LD_LIBRARY_PATH\nAPP_DATA="${HOME}/.config/filebot"\nmkdir -p ${APP_DATA}:' opt/share/filebot/bin/filebot.sh

md5sum opt/share/filebot/FileBot.jar opt/share/filebot/bin/filebot.sh > DEBIAN/md5sums

fakeroot dpkg-deb --build . ~

cd "${old_pwd}"
rm -rf ${new_pwd}

Re: FileBot on RaspberryPi

Posted: 25 Jul 2016, 09:36
by ajcraig
Why not just use the 4.7 portable?

Re: FileBot on RaspberryPi

Posted: 25 Jul 2016, 09:46
by rednoah
I'd recommend the portable package for all the embedded devices as well.

Re: FileBot on RaspberryPi

Posted: 25 Jul 2016, 20:00
by lepaperwan
Yep, quite true, I simply assumed that portable actually meant it was a .paf.exe but I took a look after ajcraig mentioned it and it seems better to use the portable version indeed.

Re: FileBot on RaspberryPi

Posted: 02 Sep 2016, 06:16
by ArieAardvarken
I am trying this, so far it looks like it is installed and working, but I get an error. I input:

Code: Select all

filebot -rename "/mnt/usbstorage/torrents_complete/Pokemon" --db TheTVDB -non-strict -r
With and without sudo I get this output:

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Pokémon, pok��mon se1]
Fetching episode data for [Pokémon]
Fetching episode data for [Pokémon Chronicles]
Fetching episode data for [Pokémon: Origins]
[MOVE] Rename [/mnt/usbstorage/torrents_complete/Pokemon/Pok��mon SE1 EP001 - Pok��mon - I Choose You!.avi] to [/mnt/usbstorage/torrents_complete/Pokemon/Pokémon - 1x01 - Pokémon! I Choose You!.avi]
[MOVE] Failed to rename [/mnt/usbstorage/torrents_complete/Pokemon/Pok��mon SE1 EP001 - Pok��mon - I Choose You!.avi]
Processed 0 files
/mnt/usbstorage/torrents_complete/Pokemon/Pok��mon SE1 EP001 - Pok��mon - I Choose You!.avi
java.nio.file.NoSuchFileException: /mnt/usbstorage/torrents_complete/Pokemon/Pok��mon SE1 EP001 - Pok��mon - I Choose You!.avi
        at net.filebot.util.FileUtilities.moveRename(FileUtilities.java:79)
        at net.filebot.StandardRenameAction$1.rename(StandardRenameAction.java:17)
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:625)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:255)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:110)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:90)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:120)
Failure (°_°)
Any idea what is wrong here? Thanks in advance! (and yes, I know, it's pokemon..)

Re: FileBot on RaspberryPi

Posted: 02 Sep 2016, 09:37
by lepaperwan
I'll say again, using the portable package provided by rednoah is a better alternative to what I've posted here, I just didn't realize it until after I wrote this.

Regarding the issue you seem to be having, sudo won't solve your problem since it seems to be coming from the fact that the 'é' in Pokémon isn't handled all too well. I'm not sure where this is coming from, I've never had the issue but then again, I've never tried to organize something with non-ASCII characters (I think).

Try using the portable version first, if this doesn't solve the issue (and I'm not convinced it will), maybe just try manually renaming one of them to replace the 'é' with a normal 'e', just to confirm that this is indeed the issue.

Re: FileBot on RaspberryPi

Posted: 02 Sep 2016, 13:56
by rednoah
Looks like your system encoding is wierd. Make sure that LOCALE is set correctly.

The portable should work because it forces the LOCALE in the filebot.sh script to account for odd Linux devices that don't set LOCALE correctly.

Re: FileBot on RaspberryPi

Posted: 02 Sep 2016, 19:00
by ArieAardvarken
Thanks for the responses, I'm very sorry that I misread. At some point I was skimming through so many tutorials and other stuff that I overlooked the portable suggestion a bit. However, I tried that one as well and it is only working when files don't have the é in them. Only after I renamed every single item to something with just e's I got it working. Is there a way to fix this for future renames in filebot itself somehow? It would be cumbersome to rename the letters each time myself.

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 16:55
by pricejt
Probably a completely nob question here but where did you get the "filebot_4.7_armhf.deb" armhf.deb package from?

I have tried so many install docs for Raspbian Jessie and can't get this working.

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 17:29
by rednoah
I recommend using the portable package: download, extract and run

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 18:20
by pricejt
Ok so this is my code.

Code: Select all

sudo wget -0 filebot.tar.xz 'https://app.filebot.net/download.php?type=portable&version=4.7.5
then i run

Code: Select all

sudo tar -xvf filebot.tar.xz
That then unzips to FileBot.exe, filebot.jar, filebot.14j.ini, filebot.cmd, filebot.sh, update-filebot.sh

Is that it? i can run the exe or what is next?

Thanks again for the help

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 18:24
by rednoah
You can run the filebot.sh script. If you do ls -l you will find that this one is executable.

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 18:34
by pricejt
ok it now errors saying Failed to initialize JavaFX. Please install javafx.

I really only need this to run the amc script from qbittorrent so i don't know that i need the gui interface.

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 18:50
by rednoah
If you call FileBit with no arguments in a headful environment then it'll launch the GUI.

Have you tried filebot -version yet?

Re: FileBot on RaspberryPi

Posted: 01 Dec 2016, 19:25
by pricejt
It returned this.
FileBot 4.7.5 (r4600) / OpenJDK Runtime Environment 1.8.0_111 / Linux 4.4.34-v7+ (arm)

Re: FileBot on RaspberryPi

Posted: 02 Dec 2016, 07:44
by rednoah
Looks good to me.

Re: FileBot on RaspberryPi

Posted: 02 Dec 2016, 16:34
by pricchri
Same Problem here! -> Rasp Pi 2 + newest Raspbian
FileBot.jar filebot -version
FileBot 4.7.5 (r4600) / Java(TM) SE Runtime Environment 1.8.0_65 / Linux 4.4.35-v7+ (arm)

Did buy FileBot for my MacBook works perfekt! Love it!

Greetings
Christopher

Re: FileBot on RaspberryPi

Posted: 03 Dec 2016, 01:18
by rednoah
Calling "filebot" without arguments to start the GUI is not a problem. That's how it's supposed to work.

Re: FileBot on RaspberryPi

Posted: 04 Dec 2016, 08:51
by pricchri
Calling FileBot like this: java -jar FileBot.jar

produce these msg:

Failed to initialize JavaFX. Please install JavaFX.

Re: FileBot on RaspberryPi

Posted: 04 Dec 2016, 15:27
by rednoah
Yes, calling FileBot without arguments will launch the GUI which requires JavaFX.

What seems to be the problem?

Re: FileBot on RaspberryPi

Posted: 05 Dec 2016, 10:07
by pricchri
So I am a little bit confused, how to run filebot-portable clean on raspbian?

Code: Select all

pi@raspberrypi:/media/hdd1-usb/downloads/FileBot 4 7 5-portable $ filebot
bash: filebot: Kommando nicht gefunden.
I just did start it like this:

Code: Select all

pi@raspberrypi:/media/hdd1-usb/downloads/FileBot 4 7 5-portable $ java -jar FileBot.jar
Thanks!

Chris

Re: FileBot on RaspberryPi

Posted: 05 Dec 2016, 13:29
by rednoah
Use the filebot.sh executable.

You'd use ./filebot.sh to run the program when you're in the same directory. If you want to call filebot as command on the command-line you need to symlink /path/to/filebot.sh to /usr/local/bin/filebot.

These are the very very basics of using Linux. You really need to know this. ;)

Re: FileBot on RaspberryPi

Posted: 09 Dec 2016, 13:09
by pricchri
Hi,
yes did try this before(filebot.sh and ./filebot.sh). Seems like it doesn't make nothing better starting the FileBot portable version always get the msg: Failed to initialize JavaFX. Please install JavaFX.

I did the tutorial on http://www.oracle.com/webfolder/technet ... section3s2
for installing JavaFX but doesn't fix the Problem.

pi@raspberrypi:~ $ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) Client VM (build 25.111-b14, mixed mode)
pi@raspberrypi:~ $ javac -version
javac 1.8.0_111
pi@raspberrypi:~ $ sudo java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) Client VM (build 25.111-b14, mixed mode)

Thanks a lot!
Chris

Re: FileBot on RaspberryPi

Posted: 09 Dec 2016, 14:00
by rednoah
Do you want to run the GUI application OR do you want to run CLI commands?

Re: FileBot on RaspberryPi

Posted: 09 Dec 2016, 15:19
by pricchri
GUI