void Start() { try { LogCalled(); SteamUtilities.GetMassSub(out string filePath); List <ulong> ids; if (filePath.IsNullorEmpty()) { string path = Path.Combine(DataLocation.localApplicationData, "LoadOrder"); ids = UGCListTransfer.GetList(path, out _); } else { ids = UGCListTransfer.GetListFromFile(filePath, out _); } var subscriedItems = PlatformService.workshop.GetSubscribedItems(); foreach (var id in ids) { if (!subscriedItems.Any(item => item.AsUInt64 == id)) { Items.Add(new ItemT(id)); } } RemainingCount = Items.Count(); StartSubToAll(); StartUpdateUI(); } catch (Exception ex) { ex.Log(); } }
void Start() { try { LogCalled(); SteamUtilities.GetMassUnSub(out string filePath); List <ulong> ids; bool missing; if (filePath.IsNullorEmpty()) { string path = Path.Combine(DataLocation.localApplicationData, "LoadOrder"); ids = UGCListTransfer.GetList(path, out missing); if (missing) { ids.AddRange(SteamUtilities.GetMissingItems().Select(item => item.AsUInt64)); UGCListTransfer.SendList(ids, path, false); // replace missing with actual ids. } } else { ids = UGCListTransfer.GetListFromFile(filePath, out missing); if (missing) { ids.AddRange(SteamUtilities.GetMissingItems().Select(item => item.AsUInt64)); UGCListTransfer.SendList(ids, filePath, false); // replace missing with actual ids. } } var subscriedItems = PlatformService.workshop.GetSubscribedItems(); foreach (var id in ids) { if (subscriedItems.Any(item => item.AsUInt64 == id)) { Items.Add(new ItemT(id)); } } RemainingCount = Items.Count(); StartUnSubToAll(); StartUpdateUI(); } catch (Exception ex) { ex.Log(); } }