From 5cbc26498b9a6db48fbbe336a183a506ea6d98bf Mon Sep 17 00:00:00 2001 From: Swan Date: Tue, 5 Mar 2019 14:32:29 -0500 Subject: [PATCH 1/6] Add difficulty calculation for maps loaded from other games --- .../Database/Maps/MapDatabaseCache.cs | 88 +--- .../Database/Maps/OtherGameCacheAction.cs | 9 + Quaver.Shared/Database/Maps/OtherGameMap.cs | 7 + .../Maps/OtherGameMapDatabaseCache.cs | 385 ++++++++++++++++++ .../Graphics/Notifications/Notification.cs | 2 +- .../Screens/Importing/ImportingScreen.cs | 1 + Quaver.Shared/Screens/QuaverScreenManager.cs | 4 + Quaver.Shared/Screens/Select/SelectScreen.cs | 12 +- 8 files changed, 410 insertions(+), 98 deletions(-) create mode 100644 Quaver.Shared/Database/Maps/OtherGameCacheAction.cs create mode 100644 Quaver.Shared/Database/Maps/OtherGameMap.cs create mode 100644 Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs diff --git a/Quaver.Shared/Database/Maps/MapDatabaseCache.cs b/Quaver.Shared/Database/Maps/MapDatabaseCache.cs index 843ab1f93d..dd25955f45 100644 --- a/Quaver.Shared/Database/Maps/MapDatabaseCache.cs +++ b/Quaver.Shared/Database/Maps/MapDatabaseCache.cs @@ -30,11 +30,6 @@ public static class MapDatabaseCache /// public static readonly string DatabasePath = ConfigManager.GameDirectory + "/quaver.db"; - /// - /// Dictates if we currently have loaded maps from other games. - /// - public static bool LoadedMapsFromOtherGames { get; private set; } - /// /// List of maps to force update after editing them. /// @@ -236,80 +231,6 @@ public static Map FindSet(int id) } } - /// - /// Reads the osu!.db file defined in config and loads all of those maps into the cache. - /// - private static IEnumerable LoadOsuBeatmapDatabase() - { - try - { - var db = OsuDb.Read(ConfigManager.OsuDbPath.Value); - MapManager.OsuSongsFolder = Path.GetDirectoryName(ConfigManager.OsuDbPath.Value) + "/Songs/"; - - // Find all osu! maps that are 4K and 7K and order them by their difficulty value. - var osuBeatmaps = db.Beatmaps.Where(x => x.GameMode == GameMode.Mania && ( x.CircleSize == 4 || x.CircleSize == 7 )).ToList(); - osuBeatmaps = osuBeatmaps.OrderBy(x => x.DiffStarRatingMania.ContainsKey(Mods.None) ? x.DiffStarRatingMania[Mods.None] : 0).ToList(); - - var osuToQuaverMaps = new List(); - - foreach (var map in osuBeatmaps) - { - var newMap = new Map - { - Md5Checksum = map.BeatmapChecksum, - Directory = map.FolderName, - Path = map.BeatmapFileName, - Artist = map.Artist, - Title = map.Title, - MapSetId = -1, - MapId = -1, - DifficultyName = map.Version, - RankedStatus = RankedStatus.NotSubmitted, - Creator = map.Creator, - AudioPath = map.AudioFileName, - AudioPreviewTime = map.AudioPreviewTime, - Description = $"", - Source = map.SongSource, - Tags = map.SongTags, - // ReSharper disable once CompareOfFloatsByEqualityOperator - Mode = map.CircleSize == 4 ? Quaver.API.Enums.GameMode.Keys4 : Quaver.API.Enums.GameMode.Keys7, - SongLength = map.TotalTime, - Game = MapGame.Osu, - BackgroundPath = "", - }; - - // Get the BPM of the osu! maps - if (map.TimingPoints != null) - { - try - { - newMap.Bpm = Math.Round(60000 / map.TimingPoints.Find(x => x.MsPerQuarter > 0).MsPerQuarter, 0); - } - catch (Exception e) - { - newMap.Bpm = 0; - } - } - - osuToQuaverMaps.Add(newMap); - } - - return osuToQuaverMaps; - } - catch (Exception e) - { - Logger.Error(e, LogType.Runtime); - - var game = GameBase.Game as QuaverGame; - var screen = game?.CurrentScreen; - - if (screen != null) - NotificationManager.Show(NotificationLevel.Error, "Failed to load maps from other games. Is your db path correct in config?"); - - return new List(); - } - } - /// /// Fetches all maps, groups them into mapsets, sets them to allow them to be played. /// @@ -318,14 +239,7 @@ public static void OrderAndSetMapsets() var maps = FetchAll(); if (ConfigManager.AutoLoadOsuBeatmaps.Value) - { - maps = maps.Concat(LoadOsuBeatmapDatabase()).ToList(); - LoadedMapsFromOtherGames = true; - } - else - { - LoadedMapsFromOtherGames = false; - } + maps = maps.Concat(OtherGameMapDatabaseCache.Load()).ToList(); var mapsets = MapsetHelper.ConvertMapsToMapsets(maps); MapManager.Mapsets = MapsetHelper.OrderMapsByDifficulty(MapsetHelper.OrderMapsetsByArtist(mapsets)); diff --git a/Quaver.Shared/Database/Maps/OtherGameCacheAction.cs b/Quaver.Shared/Database/Maps/OtherGameCacheAction.cs new file mode 100644 index 0000000000..8abd0f309c --- /dev/null +++ b/Quaver.Shared/Database/Maps/OtherGameCacheAction.cs @@ -0,0 +1,9 @@ +namespace Quaver.Shared.Database.Maps +{ + public enum OtherGameCacheAction + { + Add, + Delete, + Update + } +} \ No newline at end of file diff --git a/Quaver.Shared/Database/Maps/OtherGameMap.cs b/Quaver.Shared/Database/Maps/OtherGameMap.cs new file mode 100644 index 0000000000..5e21c0d637 --- /dev/null +++ b/Quaver.Shared/Database/Maps/OtherGameMap.cs @@ -0,0 +1,7 @@ +namespace Quaver.Shared.Database.Maps +{ + public class OtherGameMap : Map + { + + } +} \ No newline at end of file diff --git a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs new file mode 100644 index 0000000000..37b1c2c83b --- /dev/null +++ b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs @@ -0,0 +1,385 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using osu.Shared; +using osu_database_reader.BinaryFiles; +using Quaver.API.Enums; +using Quaver.API.Maps.Processors.Difficulty.Rulesets.Keys; +using Quaver.Shared.Config; +using Quaver.Shared.Graphics.Notifications; +using Quaver.Shared.Screens; +using SQLite; +using UniversalThreadManagement; +using Wobble; +using Wobble.Logging; +using GameMode = osu.Shared.GameMode; + +namespace Quaver.Shared.Database.Maps +{ + public static class OtherGameMapDatabaseCache + { + /// + /// The path of the local database + /// + public static readonly string DatabasePath = ConfigManager.GameDirectory + "/quaver.db"; + + /// + /// + public static Dictionary> MapsToCache { get; private set; } + + /// + /// Dictates if we need to update the + /// + public static bool NeedsSync => ConfigManager.AutoLoadOsuBeatmaps.Value && (MapsToCache[OtherGameCacheAction.Delete].Count > 0 || + MapsToCache[OtherGameCacheAction.Add].Count > 0 || MapsToCache[OtherGameCacheAction.Update].Count > 0); + + /// + /// The thread that the sync will take place on + /// + public static Thread Thread { get; private set; } + + /// + /// Returns if the cache is currently being synced. + /// + public static bool IsSyncing => Thread != null && Thread.IsAlive; + + /// + /// If we're currently able to sync maps. + /// + public static bool EligibleToSync => ConfigManager.AutoLoadOsuBeatmaps.Value && NeedsSync && OnSyncableScreen(); + + /// + /// The amount of maps left to sync + /// + public static int SyncMapCount => MapsToCache[OtherGameCacheAction.Delete].Count + MapsToCache[OtherGameCacheAction.Add].Count + + MapsToCache[OtherGameCacheAction.Update].Count; + /// + /// Loads maps from other games if necessary + /// + public static List Load() + { + CreateTable(); + return SyncMaps(); + } + + /// + /// Runs the worker thread for the sync process + /// + public static void RunThread() + { + if (!EligibleToSync) + return; + + if (MapsToCache == null && ConfigManager.AutoLoadOsuBeatmaps.Value) + MapDatabaseCache.OrderAndSetMapsets(); + + if (IsSyncing || !NeedsSync) + return; + + Thread = new Thread(() => + { + if (MapsToCache != null && NeedsSync) + { + NotificationManager.Show(NotificationLevel.Info, + $"Calculating difficulty ratings of other games' maps in the background. {SyncMapCount} maps left!"); + + Logger.Important($"Starting other game sync thread.", LogType.Runtime); + } + else + return; + + using (var conn = new SQLiteConnection(DatabasePath)) + { + AddMaps(conn); + UpdateMaps(conn); + DeleteMaps(conn); + + if (SyncMapCount == 0) + NotificationManager.Show(NotificationLevel.Success, "Successfully completed difficulty rating calculations for other games!"); + } + }) + { + IsBackground = true, + Priority = ThreadPriority.AboveNormal + }; + + Thread.Start(); + } + + /// + /// + /// + private static void CreateTable() + { + try + { + var conn = new SQLiteConnection(DatabasePath); + conn.CreateTable(); + + Logger.Important($"OtherGameMaps table has been created.", LogType.Runtime); + } + catch (Exception e) + { + Logger.Error(e, LogType.Runtime); + throw; + } + } + + /// + /// + /// + public static List FetchAll() => new SQLiteConnection(DatabasePath).Table().ToList(); + + /// + /// + private static List SyncMaps() + { + Logger.Important($"Starting sync of other game maps...", LogType.Runtime); + + MapsToCache = new Dictionary>() + { + {OtherGameCacheAction.Add, new List()}, + {OtherGameCacheAction.Update, new List()}, + {OtherGameCacheAction.Delete, new List()} + }; + + var currentlyCached = FetchAll(); + var osuMaps = LoadOsuBeatmapDatabase(); + + // Find maps that need to be deleted/updated from the cache + for (var i = currentlyCached.Count - 1; i >= 0; i--) + { + var map = currentlyCached[i]; + + if (osuMaps.All(x => x.Md5Checksum != map.Md5Checksum)) + { + MapsToCache[OtherGameCacheAction.Delete].Add(map); + currentlyCached.Remove(map); + continue; + } + + if (map.DifficultyProcessorVersion != DifficultyProcessorKeys.Version) + MapsToCache[OtherGameCacheAction.Update].Add(map); + } + + // Find maps that need to be added to the database. + foreach (var map in osuMaps) + { + if (currentlyCached.Find(x => x.Md5Checksum == map.Md5Checksum) != null) + continue; + + MapsToCache[OtherGameCacheAction.Add].Add(map); + currentlyCached.Add(map); + } + + currentlyCached.ForEach(x => x.Game = MapGame.Osu); + return currentlyCached; + } + + /// + /// Reads the osu!.db file defined in config and loads all of those maps into the cache. + /// + private static List LoadOsuBeatmapDatabase() + { + try + { + var db = OsuDb.Read(ConfigManager.OsuDbPath.Value); + MapManager.OsuSongsFolder = Path.GetDirectoryName(ConfigManager.OsuDbPath.Value) + "/Songs/"; + + // Find all osu! maps that are 4K and 7K and order them by their difficulty value. + var osuBeatmaps = db.Beatmaps.Where(x => x.GameMode == GameMode.Mania && ( x.CircleSize == 4 || x.CircleSize == 7 )).ToList(); + osuBeatmaps = osuBeatmaps.OrderBy(x => x.DiffStarRatingMania.ContainsKey(Mods.None) ? x.DiffStarRatingMania[Mods.None] : 0).ToList(); + + var osuToQuaverMaps = new List(); + + foreach (var map in osuBeatmaps) + { + var newMap = new OtherGameMap() + { + Md5Checksum = map.BeatmapChecksum, + Directory = map.FolderName, + Path = map.BeatmapFileName, + Artist = map.Artist, + Title = map.Title, + MapSetId = -1, + MapId = -1, + DifficultyName = map.Version, + RankedStatus = RankedStatus.NotSubmitted, + Creator = map.Creator, + AudioPath = map.AudioFileName, + AudioPreviewTime = map.AudioPreviewTime, + Description = $"", + Source = map.SongSource, + Tags = map.SongTags, + // ReSharper disable once CompareOfFloatsByEqualityOperator + Mode = map.CircleSize == 4 ? Quaver.API.Enums.GameMode.Keys4 : Quaver.API.Enums.GameMode.Keys7, + SongLength = map.TotalTime, + Game = MapGame.Osu, + BackgroundPath = "", + }; + + // Get the BPM of the osu! maps + if (map.TimingPoints != null) + { + try + { + newMap.Bpm = Math.Round(60000 / map.TimingPoints.Find(x => x.MsPerQuarter > 0).MsPerQuarter, 0); + } + catch (Exception e) + { + newMap.Bpm = 0; + } + } + + osuToQuaverMaps.Add(newMap); + } + + return osuToQuaverMaps; + } + catch (Exception e) + { + Logger.Error(e, LogType.Runtime); + + var game = GameBase.Game as QuaverGame; + var screen = game?.CurrentScreen; + + if (screen != null) + NotificationManager.Show(NotificationLevel.Error, "Failed to load maps from other games. Is your db path correct in config?"); + + return new List(); + } + } + + /// + /// Returns if the user is on a screen where syncing can occur + /// + /// + private static bool OnSyncableScreen() + { + var game = (QuaverGame) GameBase.Game; + + switch (game.CurrentScreen.Type) + { + case QuaverScreenType.Editor: + case QuaverScreenType.Gameplay: + case QuaverScreenType.Loading: + case QuaverScreenType.Alpha: + case QuaverScreenType.Importing: + case QuaverScreenType.Results: + return false; + default: + return true; + } + } + + /// + /// Adds all maps in the cache to the database + /// + private static void AddMaps(SQLiteConnection conn) + { + for (var i = MapsToCache[OtherGameCacheAction.Add].Count - 1; i >= 0; i--) + { + if (!EligibleToSync) + break; + + var map = MapsToCache[OtherGameCacheAction.Add][i]; + + try + { + map.DifficultyProcessorVersion = DifficultyProcessorKeys.Version; + map.CalculateDifficulties(); + } + // ReSharper disable once EmptyGeneralCatchClause + catch (Exception) + { + } + finally + { + // We want to insert regardless, but still pop it under another try/catch + // to avoid potential failures + try + { + conn.Insert(map); + } + // ReSharper disable once EmptyGeneralCatchClause + catch (Exception) + { + } + + MapsToCache[OtherGameCacheAction.Add].Remove(map); + + Logger.Important($"Other Game Sync Maps Left (ADD): " +$"{MapsToCache[OtherGameCacheAction.Add].Count}", LogType.Runtime, false); + } + } + } + + /// + /// Updates all existing maps + /// + private static void UpdateMaps(SQLiteConnection conn) + { + for (var i = MapsToCache[OtherGameCacheAction.Update].Count - 1; i >= 0; i--) + { + if (!EligibleToSync) + break; + + var map = MapsToCache[OtherGameCacheAction.Update][i]; + + try + { + map.DifficultyProcessorVersion = DifficultyProcessorKeys.Version; + map.CalculateDifficulties(); + } + // ReSharper disable once EmptyGeneralCatchClause + catch (Exception) + { + } + finally + { + try + { + conn.Update(map); + } + // ReSharper disable once EmptyGeneralCatchClause + catch (Exception e) + { + } + + MapsToCache[OtherGameCacheAction.Update].Remove(map); + + Logger.Important($"Other Game Sync Maps Left (UPDATE): " +$"{MapsToCache[OtherGameCacheAction.Update].Count}", LogType.Runtime, false); + } + } + } + + /// + /// Removes missing maps + /// + private static void DeleteMaps(SQLiteConnection conn) + { + for (var i = MapsToCache[OtherGameCacheAction.Delete].Count - 1; i >= 0; i--) + { + if (!EligibleToSync) + break; + + var map = MapsToCache[OtherGameCacheAction.Delete][i]; + + try + { + conn.Delete(map); + } + // ReSharper disable once EmptyGeneralCatchClause + catch (Exception) + { + } + finally + { + MapsToCache[OtherGameCacheAction.Delete].Remove(map); + Logger.Important($"Other Game Sync Maps Left (DELETE): " +$"{MapsToCache[OtherGameCacheAction.Delete].Count}", LogType.Runtime, false); + } + } + } + } +} \ No newline at end of file diff --git a/Quaver.Shared/Graphics/Notifications/Notification.cs b/Quaver.Shared/Graphics/Notifications/Notification.cs index 4140c4bbc4..2b21cd5912 100644 --- a/Quaver.Shared/Graphics/Notifications/Notification.cs +++ b/Quaver.Shared/Graphics/Notifications/Notification.cs @@ -115,7 +115,7 @@ public override void Update(GameTime gameTime) // Fade out if it has been shown a long time. if (!HasBeenClicked && TimeElapsedSinceShown >= 2500) - Alpha = MathHelper.Lerp(Alpha, 0, (float)Math.Min(GameBase.Game.TimeSinceLastFrame / 240, 1)); + Alpha = MathHelper.Lerp(Alpha, 0, (float)Math.Min(GameBase.Game.TimeSinceLastFrame / 400, 1)); base.Update(gameTime); } diff --git a/Quaver.Shared/Screens/Importing/ImportingScreen.cs b/Quaver.Shared/Screens/Importing/ImportingScreen.cs index 16a73df824..0e6050d53f 100644 --- a/Quaver.Shared/Screens/Importing/ImportingScreen.cs +++ b/Quaver.Shared/Screens/Importing/ImportingScreen.cs @@ -48,6 +48,7 @@ public override void OnFirstUpdate() { ThreadScheduler.Run(() => { + MapsetImporter.ImportMapsetsInQueue(); if (MapDatabaseCache.MapsToUpdate.Count != 0) diff --git a/Quaver.Shared/Screens/QuaverScreenManager.cs b/Quaver.Shared/Screens/QuaverScreenManager.cs index 583f0b2736..59cf4eda6c 100644 --- a/Quaver.Shared/Screens/QuaverScreenManager.cs +++ b/Quaver.Shared/Screens/QuaverScreenManager.cs @@ -7,6 +7,7 @@ using System; using Microsoft.Xna.Framework; +using Quaver.Shared.Database.Maps; using Quaver.Shared.Graphics.Transitions; using Quaver.Shared.Online; using Quaver.Shared.Scheduling; @@ -90,8 +91,11 @@ public static void ChangeScreen(QuaverScreen screen) // Update client status on the server. var status = screen.GetClientStatus(); + if (status != null) OnlineManager.Client?.UpdateClientStatus(status); + + OtherGameMapDatabaseCache.RunThread(); } /// diff --git a/Quaver.Shared/Screens/Select/SelectScreen.cs b/Quaver.Shared/Screens/Select/SelectScreen.cs index 2818468716..24dc862bb8 100644 --- a/Quaver.Shared/Screens/Select/SelectScreen.cs +++ b/Quaver.Shared/Screens/Select/SelectScreen.cs @@ -73,9 +73,7 @@ public class SelectScreen : QuaverScreen public SelectScreen() { // Go to the import screen if we've imported a map not on the select screen - if (MapsetImporter.Queue.Count > 0 || - MapDatabaseCache.LoadedMapsFromOtherGames != ConfigManager.AutoLoadOsuBeatmaps.Value || - QuaverSettingsDatabaseCache.OutdatedMaps.Count != 0 || MapDatabaseCache.MapsToUpdate.Count != 0) + if (MapsetImporter.Queue.Count > 0 || QuaverSettingsDatabaseCache.OutdatedMaps.Count != 0 || MapDatabaseCache.MapsToUpdate.Count != 0) { Exit(() => new ImportingScreen()); return; @@ -480,13 +478,7 @@ public void ExitToEditor() => Exit(() => /// /// /// - private void OnAutoLoadOsuBeatmapsChanged(object sender, BindableValueChangedEventArgs e) - { - if (e.Value == MapDatabaseCache.LoadedMapsFromOtherGames) - return; - - Exit(() => new ImportingScreen()); - } + private void OnAutoLoadOsuBeatmapsChanged(object sender, BindableValueChangedEventArgs e) => Exit(() => new ImportingScreen()); /// /// Called when the user changes the option for displaying failed scores. From 2d07a544bfe7e8450835fa02b71cd63e710c5a88 Mon Sep 17 00:00:00 2001 From: Swan Date: Tue, 5 Mar 2019 14:39:27 -0500 Subject: [PATCH 2/6] Remove test logs --- Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs index 4fb2c44a48..736c28fae9 100644 --- a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs +++ b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs @@ -312,7 +312,6 @@ private static void AddMaps(SQLiteConnection conn) MapsToCache[OtherGameCacheAction.Add].Remove(map); - Logger.Important($"Other Game Sync Maps Left (ADD): " +$"{MapsToCache[OtherGameCacheAction.Add].Count}", LogType.Runtime, false); } } } @@ -350,8 +349,6 @@ private static void UpdateMaps(SQLiteConnection conn) } MapsToCache[OtherGameCacheAction.Update].Remove(map); - - Logger.Important($"Other Game Sync Maps Left (UPDATE): " +$"{MapsToCache[OtherGameCacheAction.Update].Count}", LogType.Runtime, false); } } } @@ -379,7 +376,6 @@ private static void DeleteMaps(SQLiteConnection conn) finally { MapsToCache[OtherGameCacheAction.Delete].Remove(map); - Logger.Important($"Other Game Sync Maps Left (DELETE): " +$"{MapsToCache[OtherGameCacheAction.Delete].Count}", LogType.Runtime, false); } } } From e878d320e4954b0406f81f458556470c2e477528 Mon Sep 17 00:00:00 2001 From: Swan Date: Tue, 5 Mar 2019 14:39:40 -0500 Subject: [PATCH 3/6] Increase notification visibility time --- Quaver.Shared/Graphics/Notifications/Notification.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Quaver.Shared/Graphics/Notifications/Notification.cs b/Quaver.Shared/Graphics/Notifications/Notification.cs index 2b21cd5912..0995fb9f78 100644 --- a/Quaver.Shared/Graphics/Notifications/Notification.cs +++ b/Quaver.Shared/Graphics/Notifications/Notification.cs @@ -114,7 +114,7 @@ public override void Update(GameTime gameTime) Alpha = MathHelper.Lerp(Alpha, 0, (float) Math.Min(GameBase.Game.TimeSinceLastFrame / 60, 1)); // Fade out if it has been shown a long time. - if (!HasBeenClicked && TimeElapsedSinceShown >= 2500) + if (!HasBeenClicked && TimeElapsedSinceShown >= 4000) Alpha = MathHelper.Lerp(Alpha, 0, (float)Math.Min(GameBase.Game.TimeSinceLastFrame / 400, 1)); base.Update(gameTime); From 8906322ede953581711adca066b3aca97c4f769e Mon Sep 17 00:00:00 2001 From: Swan Date: Tue, 5 Mar 2019 15:12:29 -0500 Subject: [PATCH 4/6] Get local offset when loading osu maps --- Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs index 736c28fae9..f597b89f23 100644 --- a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs +++ b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs @@ -219,7 +219,8 @@ private static List LoadOsuBeatmapDatabase() Game = MapGame.Osu, BackgroundPath = "", RegularNoteCount = map.CountHitCircles, - LongNoteCount = map.CountSliders + LongNoteCount = map.CountSliders, + LocalOffset = map.OffsetLocal }; // Get the BPM of the osu! maps From d09f7a94a593392e4ed1c3f7be64572c74e64b43 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 5 Mar 2019 15:17:04 -0500 Subject: [PATCH 5/6] Update Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs Co-Authored-By: Swan --- Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs index f597b89f23..127d442614 100644 --- a/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs +++ b/Quaver.Shared/Database/Maps/OtherGameMapDatabaseCache.cs @@ -312,7 +312,6 @@ private static void AddMaps(SQLiteConnection conn) } MapsToCache[OtherGameCacheAction.Add].Remove(map); - } } } @@ -381,4 +380,4 @@ private static void DeleteMaps(SQLiteConnection conn) } } } -} \ No newline at end of file +} From 84075f9b02db6e09dc037fae21273d7d7e88b792 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 5 Mar 2019 15:17:14 -0500 Subject: [PATCH 6/6] Update Quaver.Shared/Screens/Importing/ImportingScreen.cs Co-Authored-By: Swan --- Quaver.Shared/Screens/Importing/ImportingScreen.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Quaver.Shared/Screens/Importing/ImportingScreen.cs b/Quaver.Shared/Screens/Importing/ImportingScreen.cs index 0e6050d53f..16a73df824 100644 --- a/Quaver.Shared/Screens/Importing/ImportingScreen.cs +++ b/Quaver.Shared/Screens/Importing/ImportingScreen.cs @@ -48,7 +48,6 @@ public override void OnFirstUpdate() { ThreadScheduler.Run(() => { - MapsetImporter.ImportMapsetsInQueue(); if (MapDatabaseCache.MapsToUpdate.Count != 0)