mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
* ignore -no-xattr flag in custom scripts (and let the code check the flag if required)
This commit is contained in:
parent
18959a8dd1
commit
353bb384de
@ -24,8 +24,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
import net.filebot.MediaTypes;
|
import net.filebot.MediaTypes;
|
||||||
import net.filebot.MetaAttributeView;
|
import net.filebot.MetaAttributeView;
|
||||||
import net.filebot.Settings;
|
|
||||||
import net.filebot.media.MediaDetection;
|
import net.filebot.media.MediaDetection;
|
||||||
|
import net.filebot.media.MetaAttributes;
|
||||||
import net.filebot.similarity.NameSimilarityMetric;
|
import net.filebot.similarity.NameSimilarityMetric;
|
||||||
import net.filebot.similarity.Normalization;
|
import net.filebot.similarity.Normalization;
|
||||||
import net.filebot.similarity.SimilarityMetric;
|
import net.filebot.similarity.SimilarityMetric;
|
||||||
@ -366,17 +366,18 @@ public class ScriptShellMethods {
|
|||||||
|
|
||||||
public static MetaAttributeView getXattr(File self) {
|
public static MetaAttributeView getXattr(File self) {
|
||||||
try {
|
try {
|
||||||
if (Settings.useExtendedFileAttributes()) {
|
return new MetaAttributeView(self);
|
||||||
return new MetaAttributeView(self);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// ignore
|
return null;
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object getMetadata(File self) {
|
public static Object getMetadata(File self) {
|
||||||
return MediaDetection.readMetaInfo(self);
|
try {
|
||||||
|
return new MetaAttributes(self).getObject();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user