Browse Source

Ensured multiple errors wouldn't be output for the same problem

pull/46/head
Anairkoen Schno 6 years ago
parent
commit
91d164c4a6
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      IPA.Loader/Updating/ModsaberML/Updater.cs

+ 9
- 0
IPA.Loader/Updating/ModsaberML/Updater.cs View File

@ -62,6 +62,8 @@ namespace IPA.Updating.ModsaberML
public bool Has { get; set; } = false; public bool Has { get; set; } = false;
public HashSet<string> Consumers { get; set; } = new HashSet<string>(); public HashSet<string> Consumers { get; set; } = new HashSet<string>();
public bool MetaRequestFailed { get; set; } = false;
public BSPluginMeta LocalPluginMeta { get; set; } = null; public BSPluginMeta LocalPluginMeta { get; set; } = null;
public override string ToString() public override string ToString()
@ -169,6 +171,7 @@ namespace IPA.Updating.ModsaberML
{ {
Logger.updater.Error($"Error getting info for {dep.Name}"); Logger.updater.Error($"Error getting info for {dep.Name}");
Logger.updater.Error(e); Logger.updater.Error(e);
dep.MetaRequestFailed = true;
continue; continue;
} }
@ -234,6 +237,12 @@ namespace IPA.Updating.ModsaberML
{ {
dep.Has = dep.Version != null;// dep.Version is only not null if its already installed dep.Has = dep.Version != null;// dep.Version is only not null if its already installed
if (dep.MetaRequestFailed)
{
Logger.updater.Warn($"{dep.Name} info request failed, not trying again");
continue;
}
var dict = new Ref<Dictionary<Version, Version>>(null); var dict = new Ref<Dictionary<Version, Version>>(null);
yield return GetGameVersionMap(dep.Name, dict); yield return GetGameVersionMap(dep.Name, dict);
try { dict.Verify(); } try { dict.Verify(); }


Loading…
Cancel
Save