1
0
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:
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() { public NumericSimilarityMetric() {
// I have absolutely no clue as to why, but I get a good matching behavior // 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()); metric = new EuclideanDistance(new NumberTokeniser());
} }

View File

@ -80,6 +80,7 @@ public class Unrar {
throw new FileNotFoundException("External program not found"); throw new FileNotFoundException("External program not found");
} else { } else {
// linux, bsd, mac, ...
String command = "unrar"; String command = "unrar";
// will throw an exception if command cannot be executed // will throw an exception if command cannot be executed
@ -119,8 +120,8 @@ public class Unrar {
Process process = builder.start(); Process process = builder.start();
// make sure process is non-interactive // if output stream is open, but not read, the subprocess may block due to limited buffer size,
// e.g. if input stream is not closed 7z.exe sometimes doesn't exit // so we close all streams just in case
process.getInputStream().close(); process.getInputStream().close();
process.getOutputStream().close(); process.getOutputStream().close();
process.getErrorStream().close(); process.getErrorStream().close();

View File

@ -3,6 +3,7 @@ package net.sourceforge.filebot.web;
import java.net.URL; import java.net.URL;
import java.util.Collections;
import net.sourceforge.tuned.DownloadTask; import net.sourceforge.tuned.DownloadTask;
@ -50,7 +51,7 @@ public class SubsceneSubtitleDescriptor implements SubtitleDescriptor {
@Override @Override
public DownloadTask createDownloadTask() { public DownloadTask createDownloadTask() {
DownloadTask downloadTask = new DownloadTask(downloadUrl); DownloadTask downloadTask = new DownloadTask(downloadUrl);
downloadTask.setRequestHeader("Referer", referer.toString()); downloadTask.setRequestHeaders(Collections.singletonMap("Referer", referer.toString()));
return downloadTask; return downloadTask;
} }