Page 1 of 1

Using {model} to create collection folders only for multiple movies

Posted: 10 Jan 2025, 14:28
by ye62dzec
Hi everyone,

I'm trying to optimize my movie organization in FileBot. Currently using this format:

Code: Select all

{collection + '/'}{plex.name} - {audioLanguages.ISO2.joining(', ', '[', ']').upper()} {allOf{vf}{vc}{hdr.replace("Dolby Vision":"DV")}.joining(' ', ' [', ']')}/{plex.name} - {audioLanguages.ISO2.joining(', ', '[', ']').upper()} {allOf{vf}{vc}{hdr.replace("Dolby Vision":"DV")}.joining(' ', ' [', ']')}
The issue is that it creates collection folders even for standalone movies. For example:

Code: Select all

- Single movie: "8MM (1999).mkv" → "8MM Collection/8MM (1999).mkv"
- Multiple movies work fine: "Batman Begins" + "Dark Knight" → "Batman Collection/[movies]"
I understand the {model} binding can be used to check for multiple movies in a collection before creating the folder structure. Can you help me integrate this into my current format to only create collection folders when there are 2+ movies?

Thanks in advance!

Re: Using {model} to create collection folders only for multiple movies

Posted: 10 Jan 2025, 16:33
by rednoah
e.g.

Format: Select all

{ if (model.collection.count(collection) >= 2) collection + '/' }

Re: Using {model} to create collection folders only for multiple movies

Posted: 11 Jan 2025, 01:44
by ye62dzec
Perfect! Thank you!