mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-12 12:25:03 -05:00
* use inferredFile for crc32 binding
This commit is contained in:
parent
508c9a7d93
commit
cd4bde2db9
@ -121,20 +121,23 @@ public class EpisodeFormatBindingBean {
|
||||
|
||||
@Define("crc32")
|
||||
public String getCRC32() throws IOException, InterruptedException {
|
||||
// use inferred media file
|
||||
File inferredMediaFile = getInferredMediaFile();
|
||||
|
||||
// try to get checksum from file name
|
||||
String checksum = FileBotUtilities.getEmbeddedChecksum(mediaFile.getName());
|
||||
String checksum = FileBotUtilities.getEmbeddedChecksum(inferredMediaFile.getName());
|
||||
|
||||
if (checksum != null)
|
||||
return checksum;
|
||||
|
||||
// try to get checksum from sfv file
|
||||
checksum = getChecksumFromSfvFile(mediaFile);
|
||||
checksum = getChecksumFromSfvFile(inferredMediaFile);
|
||||
|
||||
if (checksum != null)
|
||||
return checksum;
|
||||
|
||||
// calculate checksum from file
|
||||
return crc32(mediaFile);
|
||||
return crc32(inferredMediaFile);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user