diff --git a/installer/deb/filebot.sh b/installer/deb/filebot.sh index 4984a736..68243693 100644 --- a/installer/deb/filebot.sh +++ b/installer/deb/filebot.sh @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" +java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=deb -Dapplication.analytics=true -Dapplication.warmup=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" diff --git a/installer/ipkg/filebot.sh b/installer/ipkg/filebot.sh index e7041201..be0f5d97 100644 --- a/installer/ipkg/filebot.sh +++ b/installer/ipkg/filebot.sh @@ -1,2 +1,2 @@ #!/bin/sh -java -Dunixfs=false -DuseExtendedFileAttributes=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" \ No newline at end of file +java -Dunixfs=false -DuseExtendedFileAttributes=false -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.analytics=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -jar /usr/share/filebot/FileBot.jar "$@" \ No newline at end of file diff --git a/installer/msi/filebot.launcher.l4j.ini b/installer/msi/filebot.launcher.l4j.ini index e667e365..099b3a98 100644 --- a/installer/msi/filebot.launcher.l4j.ini +++ b/installer/msi/filebot.launcher.l4j.ini @@ -2,14 +2,15 @@ -Dapplication.deployment=msi -Dapplication.dir="%APPDATA%\FileBot" +# FileBot feature settings +-Dapplication.warmup=true +-Dapplication.analytics=true + # network settings -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -# disable analytics -# -Dapplication.analytics=false - # use native shell for move/copy operations -DuseNativeShell=true diff --git a/installer/msi/filebot.platform.launcher.l4j.ini b/installer/msi/filebot.platform.launcher.l4j.ini index 8f1ebbb0..0ef72a8b 100644 --- a/installer/msi/filebot.platform.launcher.l4j.ini +++ b/installer/msi/filebot.platform.launcher.l4j.ini @@ -6,14 +6,15 @@ -DthreadPool=8 -Dunixfs=false +# FileBot feature settings +-Dapplication.warmup=false +-Dapplication.analytics=true + # network settings -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -# disable analytics -# -Dapplication.analytics=false - # do not use native shell for move/copy operations -DuseNativeShell=false diff --git a/installer/portable/FileBot.l4j.ini b/installer/portable/FileBot.l4j.ini index 3b95e2c7..8baf3cf6 100644 --- a/installer/portable/FileBot.l4j.ini +++ b/installer/portable/FileBot.l4j.ini @@ -3,14 +3,15 @@ -Dapplication.dir="%EXEDIR%" -Duser.home="%EXEDIR%" +# FileBot feature settings +-Dapplication.warmup=false +-Dapplication.analytics=true + # network settings -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -# disable analytics -# -Dapplication.analytics=false - # do not use native shell for move/copy operations -DuseNativeShell=false diff --git a/installer/portable/filebot.sh b/installer/portable/filebot.sh index 3ed885f2..ecc9fbc6 100644 --- a/installer/portable/filebot.sh +++ b/installer/portable/filebot.sh @@ -6,4 +6,4 @@ dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" # force JVM language and encoding settings export LANG=en_US.utf8 -java -Xmx256m -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=portable "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory "-Dnet.sourceforge.tuned.prefs.file=$dir_bin/prefs.properties" -jar "$dir_bin/FileBot.jar" "$@" \ No newline at end of file +java -Xmx256m -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=false -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=portable -Dapplication.analytics=true -Dapplication.warmup=false "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory "-Dnet.sourceforge.tuned.prefs.file=$dir_bin/prefs.properties" -jar "$dir_bin/FileBot.jar" "$@" diff --git a/installer/ubuntu/filebot.sh b/installer/ubuntu/filebot.sh index 726acb18..7d04026d 100644 --- a/installer/ubuntu/filebot.sh +++ b/installer/ubuntu/filebot.sh @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.update=skip -Dapplication.deployment=ppa -Dapplication.analytics=false -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/opt/filebot -Djava.library.path=/opt/filebot -jar /opt/filebot/FileBot.jar "$@" \ No newline at end of file +java -Xmx256m -Dunixfs=false -DuseGVFS=true -DuseExtendedFileAttributes=true -Djava.net.useSystemProxies=true -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.update=skip -Dapplication.deployment=ppa -Dapplication.analytics=false -Dapplication.warmup=true -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/opt/filebot -Djava.library.path=/opt/filebot -jar /opt/filebot/FileBot.jar "$@" \ No newline at end of file diff --git a/installer/webstart/filebot.jnlp b/installer/webstart/filebot.jnlp index c47eb16a..f2bc8523 100644 --- a/installer/webstart/filebot.jnlp +++ b/installer/webstart/filebot.jnlp @@ -24,6 +24,7 @@ + diff --git a/source/net/sourceforge/filebot/Main.java b/source/net/sourceforge/filebot/Main.java index d5522332..625e646f 100644 --- a/source/net/sourceforge/filebot/Main.java +++ b/source/net/sourceforge/filebot/Main.java @@ -27,6 +27,7 @@ import java.security.PermissionCollection; import java.security.Permissions; import java.security.Policy; import java.security.ProtectionDomain; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Properties; @@ -175,7 +176,7 @@ public class Main { } // pre-load certain resources in the background - if (!"skip".equals(System.getProperty("application.warmup"))) { + if (Boolean.parseBoolean(System.getProperty("application.warmup"))) { warmupCachedResources(); } @@ -316,6 +317,10 @@ public class Main { MediaDetection.stripReleaseInfo(dummy, true); MediaDetection.matchSeriesByName(dummy, -1); MediaDetection.matchMovieName(dummy, true, -1); + + Collection empty = Collections.emptyList(); + MediaDetection.matchSeriesByDirectMapping(empty); + WebServices.TheTVDB.getLocalIndex(); } catch (Exception e) { Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage(), e); } @@ -415,8 +420,7 @@ public class Main { /** - * Initialize default SecurityManager and grant all permissions via security policy. - * Initialization is required in order to run {@link ExpressionFormat} in a secure sandbox. + * Initialize default SecurityManager and grant all permissions via security policy. Initialization is required in order to run {@link ExpressionFormat} in a secure sandbox. */ private static void initializeSecurityManager() { try { diff --git a/source/net/sourceforge/filebot/WebServices.java b/source/net/sourceforge/filebot/WebServices.java index d2590152..26fd90fc 100644 --- a/source/net/sourceforge/filebot/WebServices.java +++ b/source/net/sourceforge/filebot/WebServices.java @@ -53,7 +53,7 @@ public final class WebServices { public static final SerienjunkiesClient Serienjunkies = new SerienjunkiesClient(getApplicationProperty("serienjunkies.apikey")); // extended TheTVDB module with local search - public static final TheTVDBClient TheTVDB = new TheTVDBClientWithLocalSearch(getApplicationProperty("thetvdb.apikey")); + public static final TheTVDBClientWithLocalSearch TheTVDB = new TheTVDBClientWithLocalSearch(getApplicationProperty("thetvdb.apikey")); // movie dbs public static final IMDbClient IMDb = new IMDbClient(); @@ -124,7 +124,7 @@ public final class WebServices { } - private static class TheTVDBClientWithLocalSearch extends TheTVDBClient { + public static class TheTVDBClientWithLocalSearch extends TheTVDBClient { public TheTVDBClientWithLocalSearch(String apikey) { super(apikey); @@ -134,7 +134,7 @@ public final class WebServices { private static LocalSearch localIndex; - private synchronized LocalSearch getLocalIndex() throws IOException { + public synchronized LocalSearch getLocalIndex() throws IOException { if (localIndex == null) { // fetch data dump TheTVDBSearchResult[] data = MediaDetection.releaseInfo.getTheTVDBIndex();