Help with code/logic to reprocess entire media directory efficiently

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
howdymilsap
Posts: 35
Joined: 14 Jul 2018, 17:22

Help with code/logic to reprocess entire media directory efficiently

Post by howdymilsap »

My scenario is that I would like to reprocess my entire media directory and pull out UHD to place them into a different directory structure.

My issue is that I can't figure out the code to test the media if it is UHD or not, and then only re-process if it is UHD. i want to leave the SD/HD content alone for now. The reason I want to leave the HD/SD alone for now is that I have 10k or so files to process and want this to run as quickly as possible, and they are all stored on google drive using an rclone mount.

Here is my a format expression that I am playing with (works fine for newly processed content)

Code: Select all

{hd =~ /UHD/ ? '4K/movies' : 'movies'}/{plex.tail} [{allOf{hd}{vf}{hdr}{bitdepth+'bit'}{vc}{af}{atmos}{ac}{s3d}{source}{tags}{group}  join ', '}] 
This expression allows me to place files in this sort of structure for plex:

Code: Select all

\4K
  ..\movies
  ..\tv
\movies
\tv
Thanks as always for the great software and excellent support.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with code/logic to reprocess entire media directory efficiently

Post by rednoah »

1.
Are you using the GUI or the CLI?


2.
You can select UHD files by using a --file-filter such as this:

Code: Select all

hd =~ /UHD/
Please see Option 3 and Option 4 in the link below on how to do this for CLI and GUI respectively:
viewtopic.php?f=3&t=4222


3.
If you have previously processed these files with FileBot, then you can instantly match files based on existing xattr metadata. Please see Batch Rename any type of file for details on how to do that with the GUI, or --db xattr option if you're using the CLI.
:idea: Please read the FAQ and How to Request Help.
howdymilsap
Posts: 35
Joined: 14 Jul 2018, 17:22

Re: Help with code/logic to reprocess entire media directory efficiently

Post by howdymilsap »

thanks for the reply, I was unaware of the --file-filter option. I am trying to use the filebot-node environment and --file-filter doesn't appear to be an option (yet).

I'll just have to use the CLI.

Thanks for the solution.
Post Reply