From 9b13064e62a37662e34ddf04e61f8e84f455e59e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 16 Oct 2016 17:34:10 +0800 Subject: [PATCH] preload data files --- source/net/filebot/Main.java | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index 1223006f..6aeed4c5 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -44,7 +44,6 @@ import net.filebot.cli.ArgumentBean; import net.filebot.cli.ArgumentProcessor; import net.filebot.format.ExpressionFormat; import net.filebot.mac.MacAppUtilities; -import net.filebot.media.MediaDetection; import net.filebot.ui.FileBotMenuBar; import net.filebot.ui.GettingStartedStage; import net.filebot.ui.MainFrame; @@ -159,6 +158,13 @@ public class Main { // preload media.types (when loaded during DnD it will freeze the UI for a few hundred milliseconds) MediaTypes.getDefault(); + // JavaFX is used for ProgressMonitor and GettingStartedDialog + try { + initJavaFX(); + } catch (Throwable e) { + log.log(Level.SEVERE, "Failed to initialize JavaFX. Please install JavaFX.", e); + } + // check if application help should be shown if (!"skip".equals(System.getProperty("application.help"))) { try { @@ -176,20 +182,6 @@ public class Main { debug.log(Level.WARNING, "Failed to check for updates", e); } } - - // JavaFX is used for ProgressMonitor and GettingStartedDialog - try { - initJavaFX(); - } catch (Throwable e) { - log.log(Level.SEVERE, "Failed to initialize JavaFX. Please install JavaFX.", e); - } - - // preload data files - try { - MediaDetection.warmupCachedResources(); - } catch (Throwable e) { - debug.log(Level.WARNING, "Failed cache resources", e); - } } private static void startUserInterface(ArgumentBean args) {