public void PlaylistsR() { try { String PlaylistsX; txtbox.AppendText("\n\n" + MainWindow.globalLanguage.processer.ReturnProcessed(MainWindow.globalLanguage.bBBU.code.restoringPlaylists, Playlists + "\\Playlists.json")); Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate { })); if (!Directory.Exists(exe + "\\tmp")) { Directory.CreateDirectory(exe + "\\tmp"); } WebClient client = new WebClient(); PlaylistsX = Playlists + "\\Playlists.json"; var j = JSON.Parse(client.DownloadString("http://" + MainWindow.config.IP + ":50000/host/beatsaber/config")); var p = JSON.Parse(File.ReadAllText(PlaylistsX)); j["Config"]["Playlists"] = p["Playlists"]; BMBFUtils.PostChangesAndSync(txtbox, j["Config"].ToString().Replace("\"SongID\"", "\"Hash\"")); txtbox.AppendText("\n\n" + MainWindow.globalLanguage.mainMenu.code.playlistsRestored); Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate { })); } catch { txtbox.AppendText(MainWindow.globalLanguage.global.BMBF100); } }