mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
* check original filename for embedded CRC32 checksums
This commit is contained in:
parent
ff3babd131
commit
27472cb656
@ -385,16 +385,20 @@ public class MediaBindingBean {
|
||||
File inferredMediaFile = getInferredMediaFile();
|
||||
|
||||
// try to get checksum from file name
|
||||
String checksum = getEmbeddedChecksum(inferredMediaFile.getName());
|
||||
|
||||
if (checksum != null)
|
||||
return checksum;
|
||||
for (String filename : new String[] { getOriginalFileName(inferredMediaFile), inferredMediaFile.getName() }) {
|
||||
if (filename != null) {
|
||||
String checksum = getEmbeddedChecksum(filename);
|
||||
if (checksum != null) {
|
||||
return checksum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// try to get checksum from sfv file
|
||||
checksum = getHashFromVerificationFile(inferredMediaFile, HashType.SFV, 3);
|
||||
|
||||
if (checksum != null)
|
||||
String checksum = getHashFromVerificationFile(inferredMediaFile, HashType.SFV, 3);
|
||||
if (checksum != null) {
|
||||
return checksum;
|
||||
}
|
||||
|
||||
// calculate checksum from file
|
||||
return crc32(inferredMediaFile);
|
||||
|
Loading…
Reference in New Issue
Block a user