mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 13:59:49 -04:00
* added script for deleting xattr metadata
This commit is contained in:
parent
651e0dcc46
commit
fa55b68360
@ -80,6 +80,26 @@ public class MetaAttributeView extends AbstractMap<String, String> {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
try {
|
||||
return attributeView.list().size();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
try {
|
||||
return attributeView.list().isEmpty();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class AttributeEntry implements Entry<String, String> {
|
||||
|
||||
private final String name;
|
||||
|
13
website/scripts/xattr.groovy
Normal file
13
website/scripts/xattr.groovy
Normal file
@ -0,0 +1,13 @@
|
||||
// filebot -script fn:xattr --action clear /path/to/files
|
||||
|
||||
args.getFiles{ it.xattr.size() > 0 }.each{
|
||||
println it
|
||||
it.xattr.each{ k, v ->
|
||||
println "\t$k: $v"
|
||||
}
|
||||
// clear xattr mode
|
||||
if (_args.action == 'clear') {
|
||||
it.xattr.clear()
|
||||
println '*** CLEARED ***'
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user