Implemented new caching system with GetModInfoFromMD5

This commit is contained in:
erri120 2019-11-09 15:07:16 +01:00 committed by Timothy Baldridge
parent 4900423f70
commit 233c85b36d

View File

@ -268,10 +268,10 @@ namespace Wabbajack.Lib.NexusApi
return GetCached<GetModFilesResponse>(url).files;
}
public List<MD5Response> GetModInfoFromMD5(string gameName, string md5Hash)
public List<MD5Response> GetModInfoFromMD5(Game game, string md5Hash)
{
var url = $"https://api.nexusmods.com/v1/games/{gameName}/mods/md5_search/{md5Hash}.json";
return Get<List<MD5Response>>(url);
var url = $"https://api.nexusmods.com/v1/games/{GameRegistry.Games[game].NexusName}/mods/md5_search/{md5Hash}.json";
return GetCached<List<MD5Response>>(url);
}
public ModInfo GetModInfo(Game game, string modId)