* 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
1 changed files with 4 additions and 1 deletions

View File

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