From c6cddb4b8718013b113022d397aa2642e3147d1c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 27 Aug 2015 18:51:06 +0000 Subject: [PATCH] * use the first best option and ignore the rest --- source/net/filebot/web/ShooterSubtitles.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/web/ShooterSubtitles.java b/source/net/filebot/web/ShooterSubtitles.java index 0f7d219b..1f3a6fa7 100644 --- a/source/net/filebot/web/ShooterSubtitles.java +++ b/source/net/filebot/web/ShooterSubtitles.java @@ -92,7 +92,7 @@ public class ShooterSubtitles implements VideoHashSubtitleService { List results = new ArrayList(); 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; } } }