Celeste.Mod.mm/Mod/Helpers/ModUpdaterHelper.cs
/// <summary>
/// Downloads the full update list from the update checker server.
/// Returns null if the download fails for any reason.
/// </summary>
Downloads the full update list from the update checker server.
Returns null if the download fails for any reason.
Downloads the full update list from the update checker server . Returns null if the download fails for any reason .
public static Dictionary<string, ModUpdateInfo> DownloadModUpdateList() {
            Dictionary<string, ModUpdateInfo> updateCatalog = null;
            try {
                string modUpdaterDatabaseUrl = getModUpdaterDatabaseUrl();
                Logger.Log("ModUpdaterHelper", $"Downloading last versions list from {modUpdaterDatabaseUrl}");
                using (WebClient wc = new WebClient()) {
                    string yamlData = wc.DownloadString(modUpdaterDatabaseUrl);
                    updateCatalog = YamlHelper.Deserializer.Deserialize<Dictionary<string, ModUpdateInfo>>(yamlData);
                    foreach (string name in updateCatalog.Keys) {
                        updateCatalog[name].Name = name;
                    }
                    Logger.Log("ModUpdaterHelper", $"Downloaded {updateCatalog.Count} item(s)");
                }
            } catch (Exception e) {
                Logger.Log("ModUpdaterHelper", $"Downloading database failed!");
                Logger.LogDetailed(e);
            }
            return updateCatalog;
        }
public static Dictionary < string , ModUpdateInfo > DownloadModUpdateList ( ) { Dictionary < string , ModUpdateInfo > updateCatalog = null ; try { string modUpdaterDatabaseUrl = getModUpdaterDatabaseUrl ( ) ; Logger . Log ( " " , $" Downloading last versions list from  { modUpdaterDatabaseUrl } " ) ; using ( WebClient wc = new WebClient ( ) ) { string yamlData = wc . DownloadString ( modUpdaterDatabaseUrl ) ; updateCatalog = YamlHelper . Deserializer . Deserialize < Dictionary < string , ModUpdateInfo > > ( yamlData ) ; foreach ( string name in updateCatalog . Keys ) { updateCatalog [ name ] . Name = name ; } Logger . Log ( " " , $" Downloaded  { updateCatalog . Count }  item(s) " ) ; } } catch ( Exception e ) { Logger . Log ( " " , $" Downloading database failed! " ) ; Logger . LogDetailed ( e ) ; } return updateCatalog ; }
Downloads the full update list from the update checker server.
Downloads the full update list from the update checker server .