Help with AMC script for qBittorent in Debian

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
Kopernikus
Posts: 31
Joined: 03 Feb 2019, 20:07

Help with AMC script for qBittorent in Debian

Post by Kopernikus »

Hi,

I used to have a docker container running with qBittorrent and have Filebot (with Filbotnode) running as native dsm app on my Synology NAS.
However due lacking support for Wireguard and using DSM7 I created a virtual Debian machine just for the purpose of running Wireguard/qBittorent/Filebot/Proxy
All working fine, however now my Filbot needs to be adjusted for the task (using Plex format).

Before I had to scripts running:

For my movies:

Code: Select all

filebot -script 'dev:amc' /volume1/Downloads/completed/movies --output /volume1/video/Movies --action copy -non-strict --order Airdate --conflict auto --lang nl --def 'ut_label=Movie' 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=nld' 'clean=y' 'skipExtract=y' 'plex=PRIVATE' 'excludeList=/volume1/video/filebot-exclude.txt' --apply refresh --log info --log-file '/data/.filebot-node/filebot.log'
For my series:

Code: Select all

filebot -script 'dev:amc' /volume1/Downloads/completed/movies --output /volume1/video/Movies --action copy -non-strict --order Airdate --conflict auto --lang nl --def 'ut_label=TV' 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=nld' 'clean=y' 'skipExtract=y' 'plex=PRIVATE' 'excludeList=.excludes' --apply refresh --log info --log-file '/data/.filebot-node/filebot.log'
Now I wanted to combine those to scripts into 1, so that whenever a download is completed in Qbittorrent the script gets called.

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

Re: Help with AMC script for qBittorent in Debian

Post by rednoah »

Here are the setup instructions for qBT:
viewtopic.php?t=215#p9774


:!: Note that a parent folder named movies will force Movie Mode, so you'll want to change that if you plan on relying on Movie / Series auto-detection.
:idea: Please read the FAQ and How to Request Help.
Kopernikus
Posts: 31
Joined: 03 Feb 2019, 20:07

Re: Help with AMC script for qBittorent in Debian

Post by Kopernikus »

Ok,

So I should have:

filebot -script fn:amc --output "/volume1/media" --action copy --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

What's the difference between duplicate in the example and copy?
Also is the exclude list still needed?
And where can I add the "plex=PRIVATE"?
Also will the be standard the Plex format or do I also need to specify?

So as far as I understand I need to add to label movies and series in qBittorent? So the script now where to place the output? Or do I have to define this manual?
User avatar
rednoah
The Source
Posts: 19427
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with AMC script for qBittorent in Debian

Post by rednoah »

Action Duplicate means "try clone, try hardlink, try copy" whichever works.

I'd keep the exclude list. Just so that you can't accidentally infinite loop on your files.

The rest is just command line options as usual. I'd open a shell the play with it for a little while, to make sure I understand everything, before attempting to integrate my command into qBT.
:idea: Please read the FAQ and How to Request Help.
Kopernikus
Posts: 31
Joined: 03 Feb 2019, 20:07

Re: Help with AMC script for qBittorent in Debian

Post by Kopernikus »

@rednoah

Can you help plz?

My downloads: /mnt/Downloads
Media directory: /mnt/Media

Command I set in qBittorent:

filebot -script fn:amc --output "/mnt/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

The script runs, but is giving this error:

Code: Select all

File does not exist: 2
File does not exist: (2021)
File does not exist: 480p
File does not exist: Malayalam
File does not exist: [Hindi
File does not exist: +
File does not exist: Urdu
File does not exist: +
File does not exist: English
File does not exist: Subtitl ut_kind=multi ut_dir=/mnt/Downloads/completed/movies/Drishyam
File does not exist: 2
File does not exist: (2021)
File does not exist: 480p
File does not exist: Malayalam
File does not exist: [Hindi
File does not exist: +
File does not exist: Urdu
File does not exist: +
File does not exist: English
File does not exist: Subtitles]
File does not exist: HDRip
File does not exist: x264
File does not exist: AAC
File does not exist: By
File does not exist: Full4Movies.mkv
Run script [fn:amc] at [Fri Feb 19 14:26:59 CET 2021]
Invalid usage: no input
Abort (×_×)
User avatar
rednoah
The Source
Posts: 19427
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with AMC script for qBittorent in Debian

Post by rednoah »

Looks like argument is prematurely unquoted, breaking everything that comes after. You'll want to look into what exactly qBT is trying to execute after all the %variables have been replaced. Presumably, the value of %N contains a " double-quote or something along those lines.


:idea: Please read Cmdline and Argument Passing for details.
:idea: Please read the FAQ and How to Request Help.
Kopernikus
Posts: 31
Joined: 03 Feb 2019, 20:07

Re: Help with AMC script for qBittorent in Debian

Post by Kopernikus »

Hi,

Can't seem to find a fault like a double quote...
Can you help me how to test what could be wrong?
User avatar
rednoah
The Source
Posts: 19427
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with AMC script for qBittorent in Debian

Post by rednoah »

You'll want to call the sysenv script from qBT so that you can see the arguments that are passed along:

Code: Select all

filebot -script fn:sysenv --log-file sysenv.log --def "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
:idea: Please read the FAQ and How to Request Help.
Post Reply