Filter files with undefined binding

Any questions? Need some help?
Post Reply
devster
Posts: 417
Joined: 06 Jun 2017, 22:56

Filter files with undefined binding

Post by devster »

Hello, I'm trying to list all files which don't have a Release Group (but could be any kind of binding).
This is what I tried, but I'm missing something:

Code: Select all

filebot -mediainfo -r 'Season 01' --filter 'file.isVideo() && !group' --format {f}
filebot -mediainfo -r 'Season 01' --filter 'file.isVideo() && group == null' --format {f}
filebot -mediainfo -r 'Season 01' --filter 'file.isVideo() && group == ""' --format {f}
In short I don't understand how to the absence of a binding should be tested.
Thanks.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filter files with undefined binding

Post by rednoah »

Check if group is defined:

Code: Select all

--filter group
Check if file is video and if group is defined:

Code: Select all

--filter "f.video && group"
Check if file is video and if group is not defined:

Code: Select all

--filter "f.video && any{group}{null} == null"
@see viewtopic.php?f=5&t=1895


:idea: group will throw an Exception if it's undefined. Filter expressions that throw an Exception evaluate to false.
:idea: Please read the FAQ and How to Request Help.
Post Reply