1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 06:15:02 -05:00
This commit is contained in:
Reinhard Pointner 2016-03-09 10:32:46 +00:00
parent 3ea3045545
commit 67431e1745
3 changed files with 3 additions and 12 deletions

View File

@ -1,7 +1,6 @@
package net.filebot; package net.filebot;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.StringUtilities.*;
import java.awt.GraphicsEnvironment; import java.awt.GraphicsEnvironment;
import java.io.File; import java.io.File;
@ -297,14 +296,11 @@ public final class Settings {
} }
public static String getApplicationIdentifier() { public static String getApplicationIdentifier() {
return join(" ", getApplicationName(), getApplicationVersion(), String.format("(r%s)", getApplicationRevisionNumber())); return String.format("%s %s (r%d)", getApplicationName(), getApplicationVersion(), getApplicationRevisionNumber());
} }
public static String getJavaRuntimeIdentifier() { public static String getJavaRuntimeIdentifier() {
String name = System.getProperty("java.runtime.name"); return String.format("%s %s %s", System.getProperty("java.runtime.name"), System.getProperty("java.version"), GraphicsEnvironment.isHeadless() ? "(headless)" : "").trim();
String version = System.getProperty("java.version");
String headless = GraphicsEnvironment.isHeadless() ? "(headless)" : null;
return join(" ", name, version, headless);
} }
private static String[] applicationArgumentArray; private static String[] applicationArgumentArray;

View File

@ -6,7 +6,6 @@ import static java.util.stream.Collectors.*;
import static net.filebot.Settings.*; import static net.filebot.Settings.*;
import static net.filebot.media.MediaDetection.*; import static net.filebot.media.MediaDetection.*;
import static net.filebot.util.FileUtilities.*; import static net.filebot.util.FileUtilities.*;
import static net.filebot.util.StringUtilities.*;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -255,7 +254,7 @@ public final class WebServices {
if (LOGIN_OPENSUBTITLES.equals(id)) { if (LOGIN_OPENSUBTITLES.equals(id)) {
String password_md5 = md5(password); String password_md5 = md5(password);
OpenSubtitles.setUser(user, password_md5); OpenSubtitles.setUser(user, password_md5);
Settings.forPackage(WebServices.class).put(id, join(LOGIN_SEPARATOR, user, password_md5)); Settings.forPackage(WebServices.class).put(id, user + LOGIN_SEPARATOR + password_md5);
} else { } else {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }

View File

@ -78,10 +78,6 @@ public final class StringUtilities {
return join(values.stream(), delimiter, "", ""); return join(values.stream(), delimiter, "", "");
} }
public static String join(CharSequence delimiter, Object... values) {
return join(stream(values), delimiter, "", "");
}
public static String join(Object[] values, CharSequence delimiter) { public static String join(Object[] values, CharSequence delimiter) {
return join(stream(values), delimiter, "", ""); return join(stream(values), delimiter, "", "");
} }