diff --git a/src/main/java/net/knarcraft/ffmpegconverter/Main.java b/src/main/java/net/knarcraft/ffmpegconverter/Main.java index 7c234cc..c902109 100644 --- a/src/main/java/net/knarcraft/ffmpegconverter/Main.java +++ b/src/main/java/net/knarcraft/ffmpegconverter/Main.java @@ -111,11 +111,11 @@ class Main { String[] subtitleLang = new String[]{"eng", "*"}; boolean toStereo = true; boolean preventSigns = true; - if (input.size() > 0 && ListUtil.getListFromCommaSeparatedStringList(input, 0) != null) { - audioLang = ListUtil.getListFromCommaSeparatedStringList(input, 0); + if (input.size() > 0 && ListUtil.getListFromCommaSeparatedString(input.get(0)) != null) { + audioLang = ListUtil.getListFromCommaSeparatedString(input.get(0)); } - if (input.size() > 1 && ListUtil.getListFromCommaSeparatedStringList(input, 1) != null) { - subtitleLang = ListUtil.getListFromCommaSeparatedStringList(input, 1); + if (input.size() > 1 && ListUtil.getListFromCommaSeparatedString(input.get(1)) != null) { + subtitleLang = ListUtil.getListFromCommaSeparatedString(input.get(1)); } if (input.size() > 2) { toStereo = Boolean.parseBoolean(input.get(2)); diff --git a/src/main/java/net/knarcraft/ffmpegconverter/utility/ListUtil.java b/src/main/java/net/knarcraft/ffmpegconverter/utility/ListUtil.java index a945216..6fd361a 100644 --- a/src/main/java/net/knarcraft/ffmpegconverter/utility/ListUtil.java +++ b/src/main/java/net/knarcraft/ffmpegconverter/utility/ListUtil.java @@ -65,18 +65,15 @@ public final class ListUtil { /** * Gets a list from a comma separated string at index in list * - * @param list
A list of tokens.
- * @param indexThe index of the token containing comma separated entries.
+ * @param stringA string which may include commas.
* @returnA string list.
*/ - public static String[] getListFromCommaSeparatedStringList(List