* use OSDB guessMovie feature if our own series/movie detection logic fails
This commit is contained in:
parent
e55526c3ac
commit
39d012745a
|
@ -104,8 +104,16 @@ public final class SubtitleUtilities {
|
|||
}
|
||||
}
|
||||
|
||||
if (!searchByMovie && !searchBySeries && guessSet.isEmpty())
|
||||
// try OpenSubtitles guess function if we can't make sense of the files
|
||||
if (!searchByMovie && !searchBySeries) {
|
||||
for (File f : files) {
|
||||
guessSet.addAll(service.guess(getName(f)));
|
||||
}
|
||||
}
|
||||
|
||||
if (!searchByMovie && !searchBySeries && guessSet.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// search for subtitles online using the auto-detected or forced query information
|
||||
Set<SubtitleDescriptor> subtitles = findSubtitles(service, guessSet, querySet, searchByMovie, searchBySeries, languageName);
|
||||
|
|
|
@ -95,8 +95,6 @@ public class OpenSubtitlesClient implements SubtitleProvider, VideoHashSubtitleS
|
|||
@Override
|
||||
public List<SubtitleSearchResult> guess(String tag) throws Exception {
|
||||
List<SubtitleSearchResult> subtitles = getCache().getSearchResult("guess", tag);
|
||||
System.out.println(tag);
|
||||
System.out.println(subtitles);
|
||||
if (subtitles != null) {
|
||||
return subtitles;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue