Fix icons in server game select

save-path-regex
Pat Hartl 2023-11-05 12:55:09 -06:00
parent aec4342188
commit 53276542e8
1 changed files with 6 additions and 1 deletions

View File

@ -226,6 +226,11 @@
private string GetIcon(Game game) 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";
} }
} }