mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-11 11:55:03 -05:00
* fine-tune
This commit is contained in:
parent
6996914492
commit
92193a153d
@ -60,6 +60,10 @@ public final class SubtitleUtilities {
|
|||||||
|
|
||||||
for (List<File> byMediaFolder : mapByMediaFolder(fileSet).values()) {
|
for (List<File> byMediaFolder : mapByMediaFolder(fileSet).values()) {
|
||||||
for (Entry<String, List<File>> bySeries : mapBySeriesName(byMediaFolder, true, false, Locale.ENGLISH).entrySet()) {
|
for (Entry<String, List<File>> bySeries : mapBySeriesName(byMediaFolder, true, false, Locale.ENGLISH).entrySet()) {
|
||||||
|
// allow early abort
|
||||||
|
if (Thread.interrupted())
|
||||||
|
throw new InterruptedException();
|
||||||
|
|
||||||
// auto-detect query and search for subtitles
|
// auto-detect query and search for subtitles
|
||||||
Collection<String> querySet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
Collection<String> querySet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
||||||
List<File> files = bySeries.getValue();
|
List<File> files = bySeries.getValue();
|
||||||
@ -90,10 +94,9 @@ public final class SubtitleUtilities {
|
|||||||
|
|
||||||
Set<SubtitleDescriptor> subtitles = findSubtitles(service, querySet, languageName);
|
Set<SubtitleDescriptor> subtitles = findSubtitles(service, querySet, languageName);
|
||||||
|
|
||||||
// dialog may have been cancelled by now
|
// allow early abort
|
||||||
if (Thread.interrupted()) {
|
if (Thread.interrupted())
|
||||||
throw new InterruptedException();
|
throw new InterruptedException();
|
||||||
}
|
|
||||||
|
|
||||||
// files by possible subtitles matches
|
// files by possible subtitles matches
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
@ -105,7 +108,7 @@ public final class SubtitleUtilities {
|
|||||||
float minMatchSimilarity = strict ? 0.9f : 0.6f;
|
float minMatchSimilarity = strict ? 0.9f : 0.6f;
|
||||||
|
|
||||||
// first match everything as best as possible, then filter possibly bad matches
|
// first match everything as best as possible, then filter possibly bad matches
|
||||||
for (Entry<File, SubtitleDescriptor> it : matchSubtitles(files, subtitles, strict).entrySet()) {
|
for (Entry<File, SubtitleDescriptor> it : matchSubtitles(files, subtitles, false).entrySet()) {
|
||||||
if (sanity.getSimilarity(it.getKey(), it.getValue()) >= minMatchSimilarity) {
|
if (sanity.getSimilarity(it.getKey(), it.getValue()) >= minMatchSimilarity) {
|
||||||
subtitlesByFile.get(it.getKey()).add(it.getValue());
|
subtitlesByFile.get(it.getKey()).add(it.getValue());
|
||||||
}
|
}
|
||||||
|
@ -230,6 +230,7 @@ AVCDVD
|
|||||||
AVCHD
|
AVCHD
|
||||||
AVENUE
|
AVENUE
|
||||||
AVF
|
AVF
|
||||||
|
AVG
|
||||||
AVS1080
|
AVS1080
|
||||||
AVS720
|
AVS720
|
||||||
AW
|
AW
|
||||||
|
Loading…
Reference in New Issue
Block a user