Flibot, VUZE scripting help

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Gialandon
Posts: 3
Joined: 26 Feb 2024, 03:56

Flibot, VUZE scripting help

Post by Gialandon »

Just need someone to check the command line script I'm using for VUZE command runner:

filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def movieFormat="F:/Media/Movies/{ ~plex }" seriesFormat="F:/Media/TV Series/{ ~plex }" animeFormat="F:/Media/Anime/{ ~plex }" musicFormat="F:/Media/Audio/{ ~plex }" unsortedFormat="F:/Media/Unsorted/{ fn }"

It is set to run after download is completed and the command runner log reads:

Executing: filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def movieFormat="F:/Media/Movies/{ ~plex }" seriesFormat="F:/Media/TV Series/{ ~plex }" animeFormat="F:/Media/Anime/{ ~plex }" musicFormat="F:/Media/Audio/{ ~plex }" unsortedFormat="F:/Media/Unsorted/{ fn }"

But nothing happens. Just want to check the script is correct?
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Flibot, VUZE scripting help

Post by rednoah »

Gialandon wrote: 26 Feb 2024, 04:00 Just need someone to check the command line script I'm using for VUZE command runner:
:arrow: I have reason to believe that you did not yet read the Automated Media Center with Vuze guide? Please read the guide carefully and make sure to read each paragraph.


Gialandon wrote: 26 Feb 2024, 04:00 But nothing happens. Just want to check the script is correct?
:?: What does the log say? At a glance, you seem to not be providing any input file path, and so filebot will run and process nothing:

Code: Select all

Invalid usage: no input


:idea: A correct command-line template would look something like this, notably with substitution patterns so that VUZE command runner can turn this template into a real command with real input file paths for each completed download:
rednoah wrote: 08 Mar 2014, 03:54 :idea: Use @file syntax to refactor command-line arguments (not including variables or substitution patterns) into external text files:

Shell: Select all

filebot @/path/to/args.txt --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
:idea: Please read the FAQ and How to Request Help.
Gialandon
Posts: 3
Joined: 26 Feb 2024, 03:56

Re: Flibot, VUZE scripting help

Post by Gialandon »

" I have reason to believe that you did not yet read the Automated Media Center with Vuze guide? Please read the guide carefully and make sure to read each paragraph.
I've been using filebot and the automated media center for several years but this is the first time using Vuze. I'm definitelyy no programmer and most of it is over my head but I can copy and paste and follow instructions (mostly) I followed: viewtopic.php?t=1397.
The guide says to use the same script as utorrent which I did but changed the naming convention. I've now reverted to the default script but changing the output folder filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"""
What does the log say? At a glance, you seem to not be providing any input file path, and so filebot will run and process nothing

Doesn't say much just say it executed the script and that's it. which makes me thing the script is wrong. The default script on the AMC site doesn't include the input path so I've never included an input folder (unless running from command line) Anyway I haven't needed to specify an input folder when using bittorrent or utorrent in the past. So should I be?
A correct command-line template would look something like this, notably with substitution patterns so that VUZE command runner can turn this template into a real command with real input file paths for each completed download:
rednoah wrote: 08 Mar 2014, 03:54 :idea: Use @file syntax to refactor command-line arguments (not including variables or substitution patterns) into external text files:

Shell: Select all

filebot @/path/to/args.txt --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
"
So wait, is this the command that goes into command runner? and then I populate the ARGS.txt with the filebot command with

Shell: Select all

 Filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D 
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Flibot, VUZE scripting help

Post by rednoah »

You'll want to follow the instructions verbatim at first and make no unnecessary modifications until you have confirmed this to work, and only then make custom changes in a second step. So this is what you paste into VUZE command runner to get started:

Shell: Select all

filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file "F:/Media/amc.log" --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
:idea: I have modified --output "F:/Media" for your convenience. I have also changed --log-file "F:/Media/amc.log" so that you can find the log file more easily. But otherwise it's just copy and paste from the examples.

:?: Can you confirm that this first step is working correctly? If you get a log, then check the log. If you don't get a log, then filebot wasn't called. Depending on the situation, we'll debug from there.




:idea: The --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" bit is responsible for passing information from VUZE (e.g. the input file path) to the filebot command. That aspect is the same in qBT / uT / VUZE. The Troubleshooting section explains this in detail and gives an example of what is actually executed. So when you add your custom format options, make sure not to remove these glue logic options:

Shell: Select all

filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file "F:/Media/amc.log" --def movieFormat="{ plex }" seriesFormat="{ plex }" animeFormat="{ plex }" musicFormat="{ plex }" unsortedFormat="Unsorted/{ fn }" --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"


Gialandon wrote: 26 Feb 2024, 06:52 Doesn't say much just say it executed the script and that's it.
:idea: The log refers to the --log-file amc.log log file that is written by filebot as filebot runs, and notably not the VUZE log that merely tells you what filebot command was called by VUZE. You will find this log file in the application data folder. If you run filebot on the command-line yourself then you will see the absolute path to the log file location in the first line of the console output.




:idea: @file syntax is useful for reading complex command-line arguments (e.g. custom formats) line-by-line from an external text file. It adds complexity in the sense that there's an extra file to worry about, but it reduces complexity in the sense that you don't have to worry about correctly quoting and escaping command-line arguments. Which trade-off you choose is up to you. Your custom formats are basic, so I'd probably specify them in-line for the sake of copy-and-paste-ability.
:idea: Please read the FAQ and How to Request Help.
Gialandon
Posts: 3
Joined: 26 Feb 2024, 03:56

Re: Flibot, VUZE scripting help

Post by Gialandon »

Mate you are a legend! That worked! including the customer format options.
So comparing what you provided to what I had it looks like I messed up the glue logic options. Lesson learned.

Thanks.
Post Reply