Fix icons in server game select

This commit is contained in:
Pat Hartl 2023-11-05 12:55:09 -06:00
parent aec4342188
commit 53276542e8

View file

@ -226,6 +226,11 @@
private string GetIcon(Game game)
{
return $"/api/Games/{game?.Id}/Icon.png";
var media = game?.Media?.FirstOrDefault(m => m.Type == Data.Enums.MediaType.Icon);
if (media != null)
return $"/api/Media/{media.Id}/Download?fileId={media.FileId}";
else
return "/favicon.ico";
}
}