diff --git a/source/net/sourceforge/filebot/ui/panel/rename/metric/NumericSimilarityMetric.java b/source/net/sourceforge/filebot/ui/panel/rename/metric/NumericSimilarityMetric.java index 20b3d513..ebb4e90b 100644 --- a/source/net/sourceforge/filebot/ui/panel/rename/metric/NumericSimilarityMetric.java +++ b/source/net/sourceforge/filebot/ui/panel/rename/metric/NumericSimilarityMetric.java @@ -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()); } diff --git a/source/net/sourceforge/filebot/ui/panel/subtitle/Unrar.java b/source/net/sourceforge/filebot/ui/panel/subtitle/Unrar.java index 1c38fe30..40715e64 100644 --- a/source/net/sourceforge/filebot/ui/panel/subtitle/Unrar.java +++ b/source/net/sourceforge/filebot/ui/panel/subtitle/Unrar.java @@ -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(); diff --git a/source/net/sourceforge/filebot/web/SubsceneSubtitleDescriptor.java b/source/net/sourceforge/filebot/web/SubsceneSubtitleDescriptor.java index fcff0bbc..487ce372 100644 --- a/source/net/sourceforge/filebot/web/SubsceneSubtitleDescriptor.java +++ b/source/net/sourceforge/filebot/web/SubsceneSubtitleDescriptor.java @@ -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; }