Page 1 of 1

AMC script with 4K folder

Posted: 31 May 2018, 03:47
by Paldran
I am trying to figure out how to make the amc script create a separate folder just for 4k movies.

Here is my current movie format
MOVIE_FORMAT="Movies/{n.$QUOTE_FIXER} ({y}){'['+source+']'}/{n} ({y}) [{fn.match(/3D/)+', '}{vf}.{ac}-{channels}]"

I would like it to be another root folder called 4k, but if under movies there was a Folder that stored 4k movies, and another for any other resolution that would work fine as well.

This is all being ran on linux.

Re: AMC script with 4K folder

Posted: 31 May 2018, 05:53
by kim

Re: AMC script with 4K folder

Posted: 31 May 2018, 07:16
by rednoah
Yep. Something like that will do the trick:

Code: Select all

{vf == /2160p/ ? '/path/to/Movies 4K' : '/other/path/to/Movies'}

Re: AMC script with 4K folder

Posted: 07 Jul 2018, 10:56
by Aaron2104
rednoah wrote: 31 May 2018, 07:16 Yep. Something like that will do the trick:

Code: Select all

{vf == /2160p/ ? '/path/to/Movies 4K' : '/other/path/to/Movies'}
Hi Could you possibly show an exapmple of your script and not just this function of it as I'm having trouble adding this to my current script (sorry if this is a newbie question I've just been struggling to get this to work)

This is what I currently use and although basic it is sufficient for my needs apart from separating 4k movies from others.

Code: Select all

filebot -script fn:amc --output "U:/UTORRENT/Downloads/Completed/Filebot" --log-file amc.log --action copy --conflict override -non-strict --def music=y subtitles=en "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Thanks in advance

Re: AMC script with 4K folder

Posted: 07 Jul 2018, 15:29
by rednoah
You will need to pass in your own custom --def movieFormat. Please read the Change how files will be organized and renamed section of the amc script manual.

A prior understanding of how FileBot Format Expressions work will be helpful. I recommend using the Format Editor GUI first so you can get a bit of a feel for it.

Re: AMC script with 4K folder

Posted: 08 Jul 2018, 23:52
by Aaron2104
Hi, I've used the editor and have the expressions working as I would like in the program itself but the problem I'm having is where to place them in the script as once I add them filebot cmd window opens as expected but immediately shuts,
Here's what I've tried:

Code: Select all

filebot -script fn:amc --output "U:/UTORRENT/Downloads/Completed/Filebot" --log-file amc.log --action copy --conflict auto -non-strict --def music=y subtitles=en "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" --def movieFormat={n.colon(' - ')} ({y}){' CD'+pi} {vf}-{hd} (Runtime-{minutes}) --def seriesFormat={n} - {s00e00} - {t} -  {vf}-{hd}

Code: Select all

filebot -script fn:amc --output "U:/UTORRENT/Downloads/Completed/Filebot" --log-file amc.log --action copy --conflict auto -non-strict --def music=y subtitles=en "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" movieFormat={n.colon(' - ')} ({y}){' CD'+pi} {vf}-{hd} (Runtime-{minutes}) seriesFormat={n} - {s00e00} - {t} -  {vf}-{hd}
I can live without filtering if the {vf} {hd} would work (It works in the program itself so I know its how I'm adding it to the script but any examples I can find only show how to create the expressions for one task and not complete script examples to show how each part works together.

Re: AMC script with 4K folder

Posted: 09 Jul 2018, 06:04
by rednoah
1.
Make sure to learn how to use filebot from the command-line first, and not just via utorrent, that way you can easily test and prototype, and the error messages you get when running bad commands will help you immensely to figure out what you did wrong.

2.
Please read Cmdline and Argument Passing. It's very important to have a general understanding how command-line arguments work, especially complex ones with spaces or quotes.

3.
Once you understand the problem, you can avoid the problem altogether, by using the @file syntax for reading command-line arguments from external text files.

Re: AMC script with 4K folder

Posted: 10 Jul 2018, 00:12
by Aaron2104
Thanks for your help I'm almost there now (TV shows work, Movies needs further testing)
Also think I've fixed the annoying only works on files in folders error that seemed to come with the new Win10 store version of FB thanks to advice you gave another member so thanks for that too :)

This is what I'm testing now and seems ok so far but more testing is needed:

Code: Select all

filebot -script fn:amc --output "U:/UTORRENT/Filebot" --action copy --conflict override -non-strict --def music=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" "movieFormat=U:/UTORRENT/Filebot/movies/{n.colon(' - ')} ({y}){' CD'+pi} {vf}-{hd} (Runtime-{minutes})" "seriesFormat=U:/UTORRENT/Filebot/TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t} - {vf}"

Re: AMC script with 4K folder

Posted: 10 Jul 2018, 08:54
by rednoah
Your formats are fairly redundant. The following format will yields the same output paths:

Code: Select all

--def movieFormat="{plex} {vf}-{hd} (Runtime-{minutes})" seriesFormat="{plex} - {vf}"

Re: AMC script with 4K folder

Posted: 13 Jul 2022, 22:41
by rednoah