* use inferredFile for crc32 binding
This commit is contained in:
parent
508c9a7d93
commit
cd4bde2db9
|
@ -121,20 +121,23 @@ public class EpisodeFormatBindingBean {
|
||||||
|
|
||||||
@Define("crc32")
|
@Define("crc32")
|
||||||
public String getCRC32() throws IOException, InterruptedException {
|
public String getCRC32() throws IOException, InterruptedException {
|
||||||
|
// use inferred media file
|
||||||
|
File inferredMediaFile = getInferredMediaFile();
|
||||||
|
|
||||||
// try to get checksum from file name
|
// try to get checksum from file name
|
||||||
String checksum = FileBotUtilities.getEmbeddedChecksum(mediaFile.getName());
|
String checksum = FileBotUtilities.getEmbeddedChecksum(inferredMediaFile.getName());
|
||||||
|
|
||||||
if (checksum != null)
|
if (checksum != null)
|
||||||
return checksum;
|
return checksum;
|
||||||
|
|
||||||
// try to get checksum from sfv file
|
// try to get checksum from sfv file
|
||||||
checksum = getChecksumFromSfvFile(mediaFile);
|
checksum = getChecksumFromSfvFile(inferredMediaFile);
|
||||||
|
|
||||||
if (checksum != null)
|
if (checksum != null)
|
||||||
return checksum;
|
return checksum;
|
||||||
|
|
||||||
// calculate checksum from file
|
// calculate checksum from file
|
||||||
return crc32(mediaFile);
|
return crc32(inferredMediaFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue