FileBot won't start on RPi3

Support for Ubuntu and other Desktop Linux distributions
Post Reply
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

FileBot won't start on RPi3

Post by FadeAway12 »

Hey together,

once i launch Filebot via sudo java -jar /opt/share/filebot/Filebot.jar i get the following errors on output.

I switched my RPi 2 to a RPi3 and can't get it running until then..

Link to the output: http://imgur.com/DrgvVSh
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot won't start

Post by rednoah »

filebot.sh exists for a reason. Use it.

DO NOT just do java -jar if you don't know what options you should be passing. What did you expect to happen anyway? Starting the GUI on a headless server? :D
:idea: Please read the FAQ and How to Request Help.
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: Filebot won't start

Post by FadeAway12 »

Mh.. i am connected via VNC and issued the command on the local shell. Actually i thought i already had the GUI running using this command on the RPi 2..

Now i used: sudo ./filebot.sh (whereas i never edited the filebot.sh) and got this output:

http://imgur.com/UQlWuj2

I simply seem not to understand how to run filebot. Everytime i run "filebot" in the shell i only get "command unknown"
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot won't start on RPi3

Post by rednoah »

1.
If symlink filebot.sh into the $PATH as "filebot", then your shell will know what to do when you enter "filebot". But just because "filebot" doesn't work, doesn't mean you can't call filebot.sh by specifying the absolute path.

2.
The filebot command-line tools should work just fine on the RPi, but making the GUI work is a completely different issue. Just copy & paste the error message into Google and cross your fingers. Good luck. :D
:idea: Please read the FAQ and How to Request Help.
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

Phew.. i spent so much time with the Raspberry Pi that my Girlfriends starts feeling neglected :D


Edit: Digging through tutorials... What i got so far: ln -s /path/to/file /path/to/a/folder/where/executables/are/stored

This command creates a symlink. Well.. now that i know how to create a symlink i need to find out where executables are stored... enter: echo "$PATH"

So i created a symlink in usr/bin to /opt/share/filebot/bin/filebot.sh. Renamed it to "filebot". Entering filebot in the commandline now executes it. So far so good.. still having no idea how to really implement filebot into my system :D

Edit 2: The GUI opens fine on the RPi if i enter filebot in the local command line interface :)

Edit 3: Now i understand on how to launch scripts.. I guess here is where the real work starts... Customization.. Would you mind helping me out in exchange for a pizza/meal (or so? hope you are not offended :shock: ) :D? It won't be too complicated from what i read in the forums but for me it looks impossible to get done without sacrificing my girlfriend and job :D

Its about separating TV Shows from Movies and Movies from 3D Movies and low quality movies from all other + rename. The rename part seems to be no problem. I can dive into the commands of this. But i found this thread (viewtopic.php?f=4&t=588) and almost understood nothing regarding those fn commands. So the separation will be kind of a problem for me.

In my situation i will have all downloads (already extracted by the jdownloader2) in /media/usbdrive/Downloads and the four destinations are
1. /media/usbdrive/Filme -> for movies
2. /media/usbdrive/Filme (3D) -> for 3D movies (usually tagged with HSBS, HOU or 3D)
3. /media/usbdrive/TV-Serien -> for TV-Shows
4. /media/usbdrive/Kinofilme -> for low quality movies (usually tagged AC3D)

I would really appreciate your help here! :)
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

Mh no one here who might help me out or give me a hook up skeleton script? I simply don't know where to start despite reading some key basics about groovy and topics in this forum with sample scripts..

@rednoah Please don't feel offended :) I simply tried to bribe you with a donation :lol: If you got a little spare time to kill please feel free to contact me at anytime :mrgreen:
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot won't start on RPi3

Post by rednoah »

1.
It's not that filebot.sh isn't working, it's that the whole Java/AWT/X11 setup isn't working. It's a generic Linux issue, so you will find many many many threads try Google. If any of them will help in your specific case is another questions. What have you tried so far?

2.
Standard if-then-else for which you will find many many examples here in the forums. What have you tried so far?

(most recently, 3 days ago, here)
:idea: Please read the FAQ and How to Request Help.
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

Regarding 1: Filebot works perfectly fine at this moment. I created a symlink as you said and can now launch it with a simple "filebot" in the command line. As of right now i don't receive any weird java warnings.

This is my current sysinfo:

http://imgur.com/4MwNNlz

Regarding 2: I read a lot of topics on this forum, read your help pages and tried to figure out some more info on the groovy webpage. I don't understand get how to accomplish those ifttt commands in my script. I invested a lot of time to research on how to implement the right commands but am unsuccesful. So far my only success is initiating simple commands like "-rename" "-action move" etc but i don't have a clue on how to get Filebot to recognize what file is what (movie, 3d movie, tv show) and move it to the corresponding folder.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot won't start on RPi3

Post by rednoah »

1.
If you don't understand how formats work yet, install the GUI on your desktop and play with it:
viewtopic.php?f=5&t=2
viewtopic.php?f=4&t=588#p3901

@see http://www.filebot.net/naming.html

DO NOT prototype formats on the command-line if you don't know what you're doing. Use the GUI Editor to create your format, and then just copy and paste it into your shell.


2.
FileBot will figure out what is what, but your format decides how you want that what (file-metadata-pair) to be named (your format defines the absolute path).
:idea: Please read the FAQ and How to Request Help.
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

So, i went ahead and downloaded the amc.groovy script from your git repository and edited the part where the folder names are defined and saved it locally in /home/pi/.jd2/amc.groovy

i changed the jdownloader-postprocess.sh respectively but now get this error when executing this jdownloader-postprocess.sh:

Code: Select all

pi@Plex:~/.jd2 $ sudo ./jdownloader-postprocess.sh
Locking /opt/share/filebot/data/root/logs/amc.log
Run script [/home/pi/.jd2/amc.groovy] at [Thu Mar 10 02:03:51 CET 2016]
Parameter: pushbullet = *****
Parameter: skipExtract = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = .excludes
Parameter: ut_dir = 
Parameter: ut_kind = multi
Parameter: ut_title = 
Parameter: ut_label = 
FileNotFoundException: /home/pi/.jd2/lib/htpc.groovy (No such file or directory)
java.io.FileNotFoundException: /home/pi/.jd2/lib/htpc.groovy (No such file or directory)
	at net.filebot.cli.ArgumentProcessor$DefaultScriptProvider.fetchScript(ArgumentProcessor.java:191)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:78)
	at net.filebot.cli.ScriptShellBaseClass.executeScript(ScriptShellBaseClass.java:113)
	at net.filebot.cli.ScriptShellBaseClass.include(ScriptShellBaseClass.java:79)
	at Script1.run(Script1.groovy:80)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
	at net.filebot.Main.main(Main.java:169)
FileNotFoundException: /home/pi/.jd2/lib/web.groovy (No such file or directory)
java.io.FileNotFoundException: /home/pi/.jd2/lib/web.groovy (No such file or directory)
	at net.filebot.cli.ArgumentProcessor$DefaultScriptProvider.fetchScript(ArgumentProcessor.java:191)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:78)
	at net.filebot.cli.ScriptShellBaseClass.executeScript(ScriptShellBaseClass.java:113)
	at net.filebot.cli.ScriptShellBaseClass.include(ScriptShellBaseClass.java:79)
	at Script1.run(Script1.groovy:81)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:61)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:82)
	at net.filebot.cli.ArgumentProcessor.process(ArgumentProcessor.java:116)
	at net.filebot.Main.main(Main.java:169)
Using excludes: /media/usbdrive/Downloads/.excludes (4)
No files selected for processing
Failure (°_°)
The file has been processed fine though.. What do those error messages mean then? How can i get rid of them?
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

Okay, here is the script that finally works (after days... finally! :O)

Code: Select all

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file amc.log --lang de --def "seriesFormat=/media/usbdrive/TV-Serien/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {s00e00} - {t}" "movieFormat={fn =~ /3D/ ? '/media/usbdrive/Filme (3D)' : '/media/usbdrive/Filme'}/{n} ({y}){fn =~ /3D/ ? ' [3D]' : ''}/{n} ({y}){fn =~ /3D/ ? ' (3D)' : ''}" "unsortedFormat=/media/usbdrive/Unsorted/{file.structurePathTail}" pushbullet=XXXXXXXXXXX skipExtract=y unsorted=y music=y artwork=y excludeList="amc.excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL"
One thing though: Could you tell me how i can add key words to the fn command? Right now it only looks wether "3D" is written in the name. I would like to add HSBS and HOU. Plus i would like to expand this command in a way that it moves the files to a third folder for cinedubs when it detects "webhd".

Thanks so much for your support :D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot won't start on RPi3

Post by rednoah »

1.
So, i went ahead and downloaded the amc.groovy script from your git repository and edited the part where the folder names are defined and saved it locally in /home/pi/.jd2/amc.groovy
If your reason for doing that is editing the formats, instead of just using --def seriesFormat/movieFormat to pass in your custom formats, then this is pretty stupid. If you want to have your local clone for security concerns then you should use git clone to copy and update the repository when necessary.


2.
There is no magic media info tag that identifies 3D movies. You'll have to check existing information and determine 3D/non-3D based on that. Filename is handly, so is resolution and aspect ratio.

Learn some basic scripting and regex and you'll be able to express anything you can think of.
:idea: Please read the FAQ and How to Request Help.
FadeAway12
Donor
Posts: 51
Joined: 04 Mar 2016, 10:08

Re: FileBot won't start on RPi3

Post by FadeAway12 »

Thanks, i will open up another Thread in the right category. As Filebot runs fine on my RPi now this will become off topic
Post Reply