fix(ModUpdater): ensure instead of require icon_url
The spec says that this can be null, and indeed some mods have it set to null, and should still be considered as valid. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
		@@ -27,6 +27,7 @@
 | 
			
		||||
static ModrinthAPI api;
 | 
			
		||||
static ModPlatform::ProviderCapabilities ProviderCaps;
 | 
			
		||||
 | 
			
		||||
// https://docs.modrinth.com/api-spec/#tag/projects/operation/getProject
 | 
			
		||||
void Modrinth::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
 | 
			
		||||
{
 | 
			
		||||
    pack.addonId = Json::ensureString(obj, "project_id");
 | 
			
		||||
@@ -44,7 +45,7 @@ void Modrinth::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
 | 
			
		||||
 | 
			
		||||
    pack.description = Json::ensureString(obj, "description", "");
 | 
			
		||||
 | 
			
		||||
    pack.logoUrl = Json::requireString(obj, "icon_url");
 | 
			
		||||
    pack.logoUrl = Json::ensureString(obj, "icon_url", "");
 | 
			
		||||
    pack.logoName = pack.addonId.toString();
 | 
			
		||||
 | 
			
		||||
    ModPlatform::ModpackAuthor modAuthor;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user