1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* forgot to commit SubsceneSubtitleDescriptor in last commit

* comments in other files
This commit is contained in:
Reinhard Pointner 2008-11-19 16:28:59 +00:00
parent 4bb8ff29d8
commit 892ada4df4
3 changed files with 6 additions and 4 deletions

View File

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

View File

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

View File

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