Setting up deluge and filebot

Support for Windows users
Post Reply
mayzer
Donor
Posts: 9
Joined: 20 Aug 2013, 09:48

Setting up deluge and filebot

Post by mayzer »

Just setting up my media server again after a few years and want to intergrate with deluge.
Just having a little issues getting a shell script to call my filebot script. I coped the script off github (Edited it) and saved the file in the same directory as my filebot script. However it does not call upon my script. I feel as if i may be on the wrong track here...Do i need to upload my customised deluge-postprocess.sh to github and then the curl script in deluge will call it from there? the code you posted in the thread had a link to github? excuse the noobness just tryin to get my head around how it works, determined to work it out
here is my shell script
\

Code: Select all

#!/bin/sh -xu

# Input Parameters
ARG_PATH="$3/$2"
ARG_NAME="$2"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="$HOME/Media" # if this script is called by the deluge user, then $HOME will NOT refer to YOUR user home, but paths such as /var/lib/deluge instead

filebot -script fn:amc --output "." --action move --conflict auto -non-strict --log-file amc.log --def artwork=n subtitles=y "seriesFormat= D:/TV Series/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "movieFormat=E:/{def cn = n.after(/(?i)^the\s|^a\s/); cn =~ /^(?i)[a-z]/ ? cn[0] : '#'}/{n} ({y}){'CD'+pi}" --def plex=http://localhost:32400/web %*
pause
Which i have then pointed deluge to once a download completes however nothing happens when it finishes
Also for the life of me cannot get the -def command to notify plex of change and to update...Cannot find my token either :roll:

Any help would be greatly appreciated.
Cheers, Ledge
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Setting up deluge and filebot

Post by rednoah »

I recommend that you first learn how to use the amc script without Deluge, and only add Deluge integration once you have confirmed that you understand how the amc script works and how to call it.

Presumably, you're using Windows? Because the script you're using is for Linux / Bash so it fundamentally can't work on Windows. Using uT or qBT would probably make things easier for you.
:idea: Please read the FAQ and How to Request Help.
mayzer
Donor
Posts: 9
Joined: 20 Aug 2013, 09:48

Re: Setting up deluge and filebot

Post by mayzer »

Thanks for your prompt response.
I used to use utorrent and it would call my script and it would work no worries..
If it's easier i can can just change over to QBT, i just configured and begun to like deluge. In the end though i just want it to work.
And yea win10. The script works without torrent client integration, except for notifying plex.
I might give QBT a go and see if i have more success, should i post my logs?
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Setting up deluge and filebot

Post by rednoah »

Yes. Try qBT and then post logs to see where you're stuck.
:idea: Please read the FAQ and How to Request Help.
mayzer
Donor
Posts: 9
Joined: 20 Aug 2013, 09:48

Re: Setting up deluge and filebot

Post by mayzer »

Okay so i've swapped of to QBT and it's very much the same so i'm happy with that.
Problem i'm having is nothing happens on torrent completion whatsoever.
Here is the "Run external program on torrent completion" command which works fine when i right click send to (Context menu item that link to my batch script)
Weird thing also is my amc.log is not updating, i'm not sure if that's because i haven't specified a directory? I assume "." is working directory?
Here is the command i'm trying to get working in qBT

Code: Select all

filebot -script fn:amc --output "." --action copy --def clean=y --conflict auto -non-strict --log-file amc.log --def artwork=n subtitles=y "seriesFormat= D:/TV Series/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "movieFormat=E:/{def cn = n.after(/(?i)^the\s|^a\s/); cn =~ /^(?i)[a-z]/ ? cn[0] : '#'}/{n} ({y}){'CD'+pi}" --def plex=host:token %*
pause
I Have since uninstalled filebot and tried to delete any older version as i feel it may have been calling an older version of filebot.
I also went into appdata and deleted my amc.log file too see if it would update but so far nothing, otherwise i would post a log.


I even tried making it call upon my working script but again nothing happens on a test run

Here is what i see when using normal script that opens

Code: Select all

C:\Users\Media Server\AppData\Local\Microsoft\WindowsApps>filebot -script fn:amc --output "." --action copy --def clean=y --conflict auto -non-strict --log-file amc.log --def artwork=n subtitles=y "seriesFormat= D:/TV Series/{n}/{'Season '+s}/{n} - {s00e00} - {t}" "movieFormat=E:/{def cn = n.after(/(?i)^the\s|^a\s/); cn =~ /^(?i)[a-z]/ ? cn[0] : '#'}/{n} ({y}){'CD'+pi}" --def plex=host:token "C:\Users\Media Server\Downloads\Mother! (2017) [1080p] [YTS.AG]\Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4"
Locking C:\Users\Media Server\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Sun Feb 25 23:13:32 AEST 2018]
Parameter: clean = y
Parameter: artwork = n
Parameter: subtitles = y
Parameter: seriesFormat =  D:/TV Series/{n}/{'Season '+s}/{n} - {s00e00} - {t}
Parameter: movieFormat = E:/{def cn = n.after(/(?i)^the\s|^a\s/); cn =~ /^(?i)[a-z]/ ? cn[0] : '#'}/{n} ({y}){'CD'+pi}
Parameter: plex = *****
Argument[0]: C:\Users\Media Server\Downloads\Mother! (2017) [1080p] [YTS.AG]\Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4
Input: C:\Users\Media Server\Downloads\Mother! (2017) [1080p] [YTS.AG]\Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4
Group: [mov:mother 2017] => [Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4]
CmdlineException: Illegal language code: y
Rename movies using [TheMovieDB]
Auto-detect movie from context: [C:\Users\Media Server\Downloads\Mother! (2017) [1080p] [YTS.AG]\Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4]
[COPY] from [C:\Users\Media Server\Downloads\Mother! (2017) [1080p] [YTS.AG]\Mother!.2017.1080p.BluRay.x264-[YTS.AG].mp4] to [E:\m\mother! (2017).mp4]
Processed 1 files
Notify Plex: [host:host, token:token]
GET: https://host:32400/library/sections/all/refresh?X-Plex-Token=token
UnknownHostException: host
Done ?(?????)?

C:\Users\Media Server\AppData\Local\Microsoft\WindowsApps>pause
Press any key to continue . . .
It also appears as if qBT doesn't like the command (!) as it can't find the file to run, which would explain why it's not opening. See here
Image
Little lost, Don't understand why i'm not getting logs either?
I also just put filebot "filebot -script" without defining the location of filebot and had the same result.
Hopefully you can give me a few pointers reinhard or maybe i might have to admit defeat after fiddling around for a few hours and get some of your amazing dev remote support.
User avatar
rednoah
The Source
Posts: 22994
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Setting up deluge and filebot

Post by rednoah »

Let's take a step back, and start with a simple unmodified usage example from the documentation that is known to work.

Please paste this command into qBT:

Code: Select all

filebot -script fn:amc --output D:/Media --action duplicate --conflict skip -non-strict --log-file D:/Media/amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
After FileBot is called by qBT, check the D:/Media/amc.log log file and paste what it says.
:idea: Please read the FAQ and How to Request Help.
ZeroByDivide
Posts: 170
Joined: 16 Dec 2014, 01:39

Re: Setting up deluge and filebot

Post by ZeroByDivide »

Also to note ontop of what rednoah says, if it still won't execute and you are running qbit 4.0.4, I'd suggest downgrading to 4.0.3 until 4.0.5 releases as there are issues with "execute on torrent completion" on 4.0.4
Post Reply