This commit is contained in:
Reinhard Pointner 2016-03-05 15:14:49 +00:00
parent 74569a405f
commit 93937680a7
4 changed files with 6 additions and 10 deletions

View File

@ -717,7 +717,7 @@ public class CmdlineOperations implements CmdlineInterface {
try {
log.fine("Looking up subtitles by hash via " + service.getName());
Map<File, List<SubtitleDescriptor>> options = lookupSubtitleByHash(service, language.getName(), remainingVideos, false, strict);
Map<File, List<SubtitleDescriptor>> options = lookupSubtitlesByHash(service, remainingVideos, language.getName(), false, strict);
Map<File, File> downloads = downloadSubtitleBatch(service.getName(), options, outputFormat, outputEncoding, naming);
remainingVideos.removeAll(downloads.keySet());
subtitleFiles.addAll(downloads.values());
@ -733,7 +733,7 @@ public class CmdlineOperations implements CmdlineInterface {
try {
log.fine(format("Looking up subtitles by name via %s", service.getName()));
Map<File, List<SubtitleDescriptor>> options = findSubtitleByName(service, remainingVideos, language.getName(), query, false, strict);
Map<File, List<SubtitleDescriptor>> options = findSubtitlesByName(service, remainingVideos, language.getName(), query, false, strict);
Map<File, File> downloads = downloadSubtitleBatch(service.getName(), options, outputFormat, outputEncoding, naming);
remainingVideos.removeAll(downloads.keySet());
subtitleFiles.addAll(downloads.values());

View File

@ -65,7 +65,7 @@ import com.optimaize.langdetect.profiles.LanguageProfileReader;
public final class SubtitleUtilities {
public static Map<File, List<SubtitleDescriptor>> lookupSubtitleByHash(VideoHashSubtitleService service, String languageName, Collection<File> files, boolean addOptions, boolean strict) throws Exception {
public static Map<File, List<SubtitleDescriptor>> lookupSubtitlesByHash(VideoHashSubtitleService service, Collection<File> files, String languageName, boolean addOptions, boolean strict) throws Exception {
Map<File, List<SubtitleDescriptor>> options = service.getSubtitleList(files.toArray(new File[files.size()]), languageName);
Map<File, List<SubtitleDescriptor>> results = new LinkedHashMap<File, List<SubtitleDescriptor>>(options.size());
@ -88,7 +88,7 @@ public final class SubtitleUtilities {
return results;
}
public static Map<File, List<SubtitleDescriptor>> findSubtitleByName(SubtitleProvider service, Collection<File> fileSet, String languageName, String forceQuery, boolean addOptions, boolean strict) throws Exception {
public static Map<File, List<SubtitleDescriptor>> findSubtitlesByName(SubtitleProvider service, Collection<File> fileSet, String languageName, String forceQuery, boolean addOptions, boolean strict) throws Exception {
// ignore anything that is not a video
fileSet = filter(fileSet, VIDEO_FILES);

View File

@ -1,6 +1,5 @@
package net.filebot.ui.rename;
import static java.awt.Cursor.*;
import static java.util.Collections.*;
import static net.filebot.MediaTypes.*;
import static net.filebot.Settings.*;
@ -39,11 +38,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Action;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import net.filebot.ResourceManager;
import net.filebot.Settings;
import net.filebot.similarity.Match;
import net.filebot.similarity.NameSimilarityMetric;

View File

@ -915,7 +915,7 @@ class SubtitleAutoMatchDialog extends JDialog {
@Override
protected Map<File, List<SubtitleDescriptor>> getSubtitleList(Collection<File> files, String languageName, Component parent) throws Exception {
return lookupSubtitleByHash(service, languageName, files, true, false);
return lookupSubtitlesByHash(service, files, languageName, true, false);
}
@Override
@ -940,7 +940,7 @@ class SubtitleAutoMatchDialog extends JDialog {
@Override
protected Map<File, List<SubtitleDescriptor>> getSubtitleList(Collection<File> fileSet, String languageName, Component parent) throws Exception {
return findSubtitleByName(service, fileSet, languageName, null, true, false);
return findSubtitlesByName(service, fileSet, languageName, null, true, false);
}
@Override