1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 01:08:52 -05:00

* check original filename for embedded CRC32 checksums

This commit is contained in:
Reinhard Pointner 2014-07-09 18:55:46 +00:00
parent ff3babd131
commit 27472cb656

View File

@ -385,16 +385,20 @@ public class MediaBindingBean {
File inferredMediaFile = getInferredMediaFile(); File inferredMediaFile = getInferredMediaFile();
// try to get checksum from file name // try to get checksum from file name
String checksum = getEmbeddedChecksum(inferredMediaFile.getName()); for (String filename : new String[] { getOriginalFileName(inferredMediaFile), inferredMediaFile.getName() }) {
if (filename != null) {
if (checksum != null) String checksum = getEmbeddedChecksum(filename);
if (checksum != null) {
return checksum; return checksum;
}
}
}
// try to get checksum from sfv file // try to get checksum from sfv file
checksum = getHashFromVerificationFile(inferredMediaFile, HashType.SFV, 3); String checksum = getHashFromVerificationFile(inferredMediaFile, HashType.SFV, 3);
if (checksum != null) {
if (checksum != null)
return checksum; return checksum;
}
// calculate checksum from file // calculate checksum from file
return crc32(inferredMediaFile); return crc32(inferredMediaFile);