private static void Postfix(StartupLogo __instance, ref StartupLogo.State state) { if (state == StartupLogo.State.Done) { SongDownloader.StartNewSongSearch(); PlaylistManager.OnApplicationStart(); FilterPanel.OnApplicationStart(); SongLoadingManager.StartSongListUpdate(); //PlaylistManager.GetAllApiSongs(); } }
public override void OnApplicationStart() { Config.RegisterConfig(); mainSongDirectory = Path.Combine(Application.streamingAssetsPath, "HmxAudioAssets", "songs"); downloadsDirectory = Application.dataPath.Replace("Audica_Data", "Downloads"); deletedDownloadsListPath = Path.Combine(downloadsDirectory, "SongBrowserDownload_DeletedFiles"); CheckFolderDirectories(); if (MelonHandler.Mods.Any(it => it.Info.SystemType.Name == nameof(SongDataLoader))) { songDataLoaderInstalled = true; MelonLogger.Msg("Song Data Loader is installed. Enabling integration"); } else { MelonLogger.Warning("Song Data Loader is not installed. Consider downloading it for the best experience :3"); } if (MelonHandler.Mods.Any(it => it.Info.SystemType.Name == nameof(ModSettings))) { modSettingsInstalled = true; } if (MelonHandler.Mods.Any(it => it.Assembly.GetName().Name == "AuthorableModifiers")) { var scoreVersion = new Version(MelonHandler.Mods.First(it => it.Assembly.GetName().Name == "AuthorableModifiers").Info.Version); var lastUnsupportedVersion = new Version("1.2.4"); var result = scoreVersion.CompareTo(lastUnsupportedVersion); if (result > 0) { authorableInstalled = true; } } if (!SongBrowser.emptiedDownloadsFolder) { Utility.EmptyDownloadsFolder(); } if (!isInitialized && MenuState.sState != MenuState.State.TitleScreen) { SongDownloader.StartNewSongSearch(); PlaylistManager.OnApplicationStart(); FilterPanel.OnApplicationStart(); SongLoadingManager.StartSongListUpdate(); } }