Trying to get AMC working on Raspberry Pi deluge machine

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Malakesher
Posts: 5
Joined: 16 May 2014, 17:00

Trying to get AMC working on Raspberry Pi deluge machine

Post by Malakesher »

As the title says I am trying to get AMC working on my Raspberry Pi deluge machine.

I have installed java and I have extracted the filebot .ipk to what I think is the right place.

If I run /usr/share/filebot/bin/filebot.sh -script fn:sysinfo

It returns

Code: Select all

FileBot 4.0 (r2056)
JNA Native: 4.0.0
May 20, 2014 11:15:04 AM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/home/pi/opt/usr/share/filebot/FileBot.jar])
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: cannot open shared object file: No such file or directory
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: DISABLED
Groovy Engine: 2.2.0
Java(TM) SE Runtime Environment 1.7.0_40 (headless)
32-bit Java HotSpot(TM) Client VM
Linux (arm)
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
and I have a script name delugescript.sh

Code: Select all

#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3

/usr/share/filebot/bin/filebot.sh -script fn:amc --output "/mnt/media" --log-file amc.log --action copy --conflict override -non-strict --def artwork=n "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=$TORRENT_NAME"

This is set to execute when deluge finishes downloading a torrent but so far nothing happens

I feel like it is something with my install of java or filebot but does anyone know what I have done wrong?


EDIT:
Also just to add to everything.
If I run:

java -version
I get

Code: Select all

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)
javac -version
I get

Code: Select all

javac 1.7.0_40
User avatar
rednoah
The Source
Posts: 23942
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by rednoah »

Next step would be to make sure that Deluge actually calls your delugescript.sh script. You did chmod +x it right?
:idea: Please read the FAQ and How to Request Help.
Malakesher
Posts: 5
Joined: 16 May 2014, 17:00

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by Malakesher »

I just tested it with the latest episode of bones and go this result.

So the script seems to be running at least

Code: Select all

File: amc.log

Parameter: artwork = n
Parameter: ut_dir = /mnt/Downloads/Bones.S09E24.HDTV.XviD-AFG
Parameter: ut_kind = multi
Parameter: ut_title = Bones.S09E24.HDTV.XviD-AFG
May 20, 2014 2:19:12 PM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
Input: /mnt/Downloads/Bones.S09E24.HDTV.XviD-AFG/Bones.S09E24.HDTV.XviD-AFG.avi
Exclude: /mnt/Downloads/Bones.S09E24.HDTV.XviD-AFG/Bones.S09E24.HDTV.XviD-AFG.nfo
Group: [tvs:bones] => [Bones.S09E24.HDTV.XviD-AFG.avi]
Rename episodes using [TheTVDB]
Auto-detected query: [Bones]
Fetching episode data for [Bones]
[COPY] Rename [/mnt/Downloads/Bones.S09E24.HDTV.XviD-AFG/Bones.S09E24.HDTV.XviD-AFG.avi] to [/mnt/media/TV Shows/Bones/Season 09/Bones - S09E24 - The Recluse in the Recliner.avi]
[COPY] Failed to rename [/mnt/Downloads/Bones.S09E24.HDTV.XviD-AFG/Bones.S09E24.HDTV.XviD-AFG.avi]
IOException: Failed to create folder: /mnt/media/TV Shows/Bones/Season 09
Done ヾ(@⌒ー⌒@)ノ

User avatar
rednoah
The Source
Posts: 23942
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by rednoah »

The user that is executing the script doesn't have permissions for that folder.

Most people run deluge with it's own user, who probably doesn't have permission to read/write to /mnt so it's gonna work when you run it but fail when deluge runs it.
:idea: Please read the FAQ and How to Request Help.
Malakesher
Posts: 5
Joined: 16 May 2014, 17:00

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by Malakesher »

That's what I thought but as far as I know I am running deluge on the normal pi account. At least I installed it and set it up from that account and I have never created another account on my RPi. Also I am pretty sure that my account (pi) has full read+write for that directory at least I know from it I can create folders and text documents within them with using commands like sudo.

I am pretty much a linux noob (if it wasn't already obvious) just to make sure is the a simple way to give r+w permissions to that account?

Or is there anything else that could be causing the problem.
Malakesher
Posts: 5
Joined: 16 May 2014, 17:00

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by Malakesher »

Ok I seem to have got the copying and renaming of files sorted now I am only having trouble with extracting files.

Code: Select all

Parameter: artwork = n
Parameter: ut_dir = /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL
Parameter: ut_kind = multi
Parameter: ut_title = Arrow.S02E22.HDTV.x264-LOL
SevenZipNativeInitializationException: Failed to load 7z-JBinding: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: cannot open shared object file: No such file or directory
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r00
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r02
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r17
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r09
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r16
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.sfv
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r11
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r06
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r10
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r15
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.nfo
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r04
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r01
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r08
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r07
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r03
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r14
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r05
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r18
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r13
Exclude: /mnt/Downloads/Arrow.S02E22.HDTV.x264-LOL/arrow.222.hdtv-lol.r12
Done ヾ(@⌒ー⌒@)ノ
This is the log file.

And thank you for all the help. It is really appreciated.
User avatar
rednoah
The Source
Posts: 23942
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by rednoah »

The 7-Zip-JBinding project doesn't support ARM.

You're welcome to make a contribution here:
http://sevenzipjbind.sourceforge.net/
:idea: Please read the FAQ and How to Request Help.
Malakesher
Posts: 5
Joined: 16 May 2014, 17:00

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by Malakesher »

So does that mean there is no way to extract files because the strange thing is of three attempts I have tried one has actually worked.

Code: Select all

Parameter: artwork = n
Parameter: ut_dir = /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL
Parameter: ut_kind = multi
Parameter: ut_title = Revolution.2012.S02E19.HDTV.x264-LOL
SevenZipNativeInitializationException: Failed to load 7z-JBinding: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: cannot open shared object file: No such file or directory
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r04
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.sfv
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r20
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r18
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r17
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r06
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r13
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r12
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r11
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r00
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r14
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r09
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r15
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r10
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r07
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r19
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.nfo
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r01
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r05
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r02
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r03
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r16
Exclude: /mnt/Downloads/Revolution.2012.S02E19.HDTV.x264-LOL/revolution.2012.219.hdtv-lol.r08
Done ヾ(@⌒ー⌒@)ノ
And the successful one

Code: Select all

Parameter: artwork = n
Parameter: ut_dir = /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS
Parameter: ut_kind = multi
Parameter: ut_title = Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS
SevenZipNativeInitializationException: Failed to load 7z-JBinding: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: /home/pi/opt/usr/share/filebot/lib7-Zip-JBinding.so: cannot open shared object file: No such file or directory
May 20, 2014 8:17:37 PM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
Input: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.mp4
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r04
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r11
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.sfv
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.nfo
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r00
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r09
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r02
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r03
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r01
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r06
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r07
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r05
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r08
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/Sample/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers-sample.mp4
Exclude: /mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.r10
Group: [tvs:marvels agents of s h i e l d] => [marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Marvels Agents of S H I E L D]
Fetching episode data for [Marvel's Agents of S.H.I.E.L.D.]
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 01/Marvel's Agents of S.H.I.E.L.D. - S01E22 - Beginning of the End
[COPY] Rename [/mnt/Downloads/Marvels.Agents.of.S.H.I.E.L.D.S01E22.HDTV.x264-KILLERS/marvels.agents.of.s.h.i.e.l.d.s01e22.hdtv.x264-killers.mp4] to [/mnt/Media/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 01/Marvel's Agents of S.H.I.E.L.D. - S01E22 - Beginning of the End.mp4]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
Is there a reason this one has worked? Anything in particular that is different from the first two?

Thank you for helping me out.
User avatar
rednoah
The Source
Posts: 23942
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to get AMC working on Raspberry Pi deluge machine

Post by rednoah »

Since the code for extracting archives doesn't exist, I'm pretty sure it doesn't extract any archives. But if you extract the archives and run filebot again it will of course pick up the new file. ;)
:idea: Please read the FAQ and How to Request Help.
Post Reply