AMC and "ut" variables

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

AMC and "ut" variables

Post by cheaters »

Some "ut" variables are listed on the AMC page.

:?: Where is the exhaustive list of FileBot "ut" variables and their options for torrenting apps?

For instance qBittorrent shows these as being supported parameters:

Code: Select all

Supported parameters (case sensitive): 
%N: Torrent name
%L: Category
%G: Tags (separated by comma)
%F: Content path (same as root path for multifile torrent)
%R: Root path (first torrent subdirectory path)
%D: Save path
%C: Number of files
%Z: Torrent size (bytes)
%T: Current tracker
%1: Info hash
Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., "%N")
:?: For example is there an option to use

Code: Select all

ut_tags=%G
Or the rest:

Code: Select all

 %R, %D, %C, %Z, %T, %1
These are the only ones I am aware:

Code: Select all

ut_dir=%F
ut_kind=multi
ut_title=%N
ut_label=%L
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC and "ut" variables

Post by rednoah »

The exhaustive of ut_* parameters used by the amc script is given in the first example:

Code: Select all

--def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

:idea: The --def name=value pairs simply pass along information along to the script. No more. No less.


:idea: The amc script is a command-line tool. It doesn't even know the concept of a torrent app, much less care about the specific one you happen to have chosen. It's just a command-line tool, that accepts a few options to know which file paths need to be processed, and then proceeds to do just that.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: AMC and "ut" variables

Post by cheaters »

I never suggested the script knew the name of the application or that the script had a consciousness. :lol:

I was asking if there were more ut_*parameters that weren't listed on that page. Believe it or not there are instances where information is missing from the help pages. :o

I like to tag my torrents and I see there is a potential "hook" for tag names and other data as well. You are saying the parameters for those "hooks" don't currently exist and you don't plan to add the code to the AMC script. That's fine. Thanks for the response.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC and "ut" variables

Post by rednoah »

There are indeed undocumented parameters for various special purposes or features that are no longer maintained. Documenting them would just be confusing and likely lead you down the wrong path.


However, if you do have a specific use case in mind for which the amc script would need some additional information from the torrent app, then that would be a different topic altogether. ;)


As for "hooks", there are no hooks. There is a {tags} binding though, which is unrelated to the CLI or any --def ut_* parameters. {tags} exists to replace commonly used fn.match(/.../) expressions. Any kind of back-and-forth communication between amc script and torrent app is however not planned for the sake of simplicity.


It is possible to reference the --def name=value pairs within your format:

Code: Select all

filebot -rename Alias.1x01.mp4 -non-strict --action TEST --log INFO --format "{plex.name} [{defines.mytags}]" --def mytags="jprokos"
[TEST] from [Alias.1x01.mp4] to [Alias - S01E01 - Truth Be Told [jprokos].mp4]
But most users will find it more straight-forward to just dynamically generate the format, rather than having extra logic passing along arguments and values:

Code: Select all

filebot -rename Alias.1x01.mp4 -non-strict --action TEST --log INFO --format "{plex.name} [$MY_TAGS]"
[TEST] from [Alias.1x01.mp4] to [Alias - S01E01 - Truth Be Told [jprokos].mp4]
:arrow: Advanced users with special requirements would usually take this one step further just have have their torrent app call their custom glue logic script first, passing along information via necessary, and then decide in that glue logic script what do. Maybe call filebot this way. Maybe call filebot that way. Maybe call a different tool altogether depending on the situation.
:idea: Please read the FAQ and How to Request Help.
Post Reply