How to check if Extended Attributes exist for local assets

Any questions? Need some help?
Post Reply
dokuro
Posts: 22
Joined: 01 Sep 2023, 18:45

How to check if Extended Attributes exist for local assets

Post by dokuro »

Quick question. I've enabled extended attributes via filebot -script fn:properties --def net.filebot.xattr.store=.xattr and am wondering what would be the best way to validate if extended attributes actually exist ?

I was initially thinking something like find <path to tv shows> -mindepth 3 -maxdepth 3 -type d '!' -exec test -d "{}/.xattr" ';' -print but that is somewhat flawed as it'll only detect if the top level .xattr does not exists at the show level and not if individual net.filebot.filename or net.filebot.metadata exist for each and every episode.

Maybe something exists already as part of one of the groovy scripts but so far I've not been able to find something that would accomplish this. Goal here is to validate (weekly) that I'm not missing anything. Maybe something with the --action prune action could help? Thanks.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to check if Extended Attributes exist for local assets

Post by rednoah »

:?: Does assets refer to video files? Because FileBot stores xattr metadata for video files only, and not companion files, such as *.jpg files or *.xml files, so you won't find xattr metadata for the latter type of file.


e.g. find video files with Episode type xattr metadata:

Shell: Select all

filebot -find /input --filter "f.video && episode"

e.g. find video files without Episode type xattr metadata:

Shell: Select all

filebot -find /input --filter "f.video && none{ episode }"

:idea: You can use {movie} to check for Movie type metadata, or something like {object} or {id} to check for either.
:idea: Please read the FAQ and How to Request Help.
dokuro
Posts: 22
Joined: 01 Sep 2023, 18:45

Re: How to check if Extended Attributes exist for local assets

Post by dokuro »

Very good. Thank you again. This worked perfectly.
Post Reply