* use inferredFile for crc32 binding

This commit is contained in:
Reinhard Pointner 2009-05-26 17:05:05 +00:00
parent 508c9a7d93
commit cd4bde2db9
1 changed files with 6 additions and 3 deletions

View File

@ -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);
}