mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-22 15:58:52 -05:00
* forgot to commit SubsceneSubtitleDescriptor in last commit
* comments in other files
This commit is contained in:
parent
4bb8ff29d8
commit
892ada4df4
@ -21,7 +21,7 @@ public class NumericSimilarityMetric extends AbstractNameSimilarityMetric {
|
||||
|
||||
public NumericSimilarityMetric() {
|
||||
// I have absolutely no clue as to why, but I get a good matching behavior
|
||||
// when using my NumberTokensier with EuclideanDistance
|
||||
// when using a numeric tokensier with EuclideanDistance
|
||||
metric = new EuclideanDistance(new NumberTokeniser());
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ public class Unrar {
|
||||
|
||||
throw new FileNotFoundException("External program not found");
|
||||
} else {
|
||||
// linux, bsd, mac, ...
|
||||
String command = "unrar";
|
||||
|
||||
// will throw an exception if command cannot be executed
|
||||
@ -119,8 +120,8 @@ public class Unrar {
|
||||
|
||||
Process process = builder.start();
|
||||
|
||||
// make sure process is non-interactive
|
||||
// e.g. if input stream is not closed 7z.exe sometimes doesn't exit
|
||||
// if output stream is open, but not read, the subprocess may block due to limited buffer size,
|
||||
// so we close all streams just in case
|
||||
process.getInputStream().close();
|
||||
process.getOutputStream().close();
|
||||
process.getErrorStream().close();
|
||||
|
@ -3,6 +3,7 @@ package net.sourceforge.filebot.web;
|
||||
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
|
||||
import net.sourceforge.tuned.DownloadTask;
|
||||
|
||||
@ -50,7 +51,7 @@ public class SubsceneSubtitleDescriptor implements SubtitleDescriptor {
|
||||
@Override
|
||||
public DownloadTask createDownloadTask() {
|
||||
DownloadTask downloadTask = new DownloadTask(downloadUrl);
|
||||
downloadTask.setRequestHeader("Referer", referer.toString());
|
||||
downloadTask.setRequestHeaders(Collections.singletonMap("Referer", referer.toString()));
|
||||
|
||||
return downloadTask;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user