1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-10 11:25:04 -05:00

* use the first best option and ignore the rest

This commit is contained in:
Reinhard Pointner 2015-08-27 18:51:06 +00:00
parent 4efc22e4eb
commit c6cddb4b87

View File

@ -92,7 +92,7 @@ public class ShooterSubtitles implements VideoHashSubtitleService {
List<SubtitleDescriptor> results = new ArrayList<SubtitleDescriptor>(); List<SubtitleDescriptor> results = new ArrayList<SubtitleDescriptor>();
String name = getNameWithoutExtension(file.getName()); String name = getNameWithoutExtension(file.getName());
for (JSONObject result : jsonList(response)) { JSON: for (JSONObject result : jsonList(response)) {
if (result == null) if (result == null)
continue; continue;
@ -102,6 +102,9 @@ public class ShooterSubtitles implements VideoHashSubtitleService {
String type = (String) fd.get("Ext"); String type = (String) fd.get("Ext");
String link = (String) fd.get("Link"); String link = (String) fd.get("Link");
results.add(new ShooterSubtitleDescriptor(name, type, link, languageName)); results.add(new ShooterSubtitleDescriptor(name, type, link, languageName));
// use the first best option and ignore the rest
break JSON;
} }
} }
} }