From e8769fa0cb6509e91c52dc543b0ca88d4d734d33 Mon Sep 17 00:00:00 2001 From: N1GHT Date: Fri, 24 Nov 2023 07:33:02 +0100 Subject: [PATCH] Reduced Sleep on Insert a bit and added Sleep on remove to fix timing Issues. --- MicroSDInstallStatusUpdater.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MicroSDInstallStatusUpdater.cs b/MicroSDInstallStatusUpdater.cs index ab5dd64..82cac5d 100644 --- a/MicroSDInstallStatusUpdater.cs +++ b/MicroSDInstallStatusUpdater.cs @@ -53,6 +53,7 @@ public override void OnApplicationStarted(OnApplicationStartedEventArgs args) private void SDCardRemoved(object sender, EventArrivedEventArgs e) { logger.Info("[SDCardInstallStatusUpdater] SDCard Removed! Updating Database!"); + Thread.Sleep(2000); foreach (var game in PlayniteApi.Database.Games) { var InstallDir = game.InstallDirectory; @@ -75,7 +76,7 @@ private void SDCardRemoved(object sender, EventArrivedEventArgs e) private void SDCardInserted(object sender, EventArrivedEventArgs e) { logger.Info("[SDCardInstallStatusUpdater] SDCard Inserted! Sleeping a bit to let Windows handle and mount shit :3 Updating Database!"); - Thread.Sleep(5000); + Thread.Sleep(2000); logger.Info("[SDCardInstallStatusUpdater] Sleep Done! Updating Database!"); foreach (var game in PlayniteApi.Database.Games) { @@ -106,4 +107,4 @@ public override UserControl GetSettingsView(bool firstRunSettings) return new MicroSDInstallStatusUpdaterSettingsView(); } } -} \ No newline at end of file +}