Page 1 of 1

Help with code/logic to reprocess entire media directory efficiently

Posted: 29 Sep 2018, 18:24
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.

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

Posted: 30 Sep 2018, 11:06
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.

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

Posted: 01 Oct 2018, 04:09
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.

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

Posted: 21 Mar 2023, 05:04
by rednoah