diff --git a/FoliCon/Modules/IGDBClass.cs b/FoliCon/Modules/IGDBClass.cs index e4239351..bb2fa6e3 100644 --- a/FoliCon/Modules/IGDBClass.cs +++ b/FoliCon/Modules/IGDBClass.cs @@ -43,6 +43,7 @@ public async Task SearchGameAsync(string query) Contract.Assert(_serviceClient != null); var r = await _serviceClient.QueryAsync(IGDBClient.Endpoints.Games, $"search \"{query}\"; fields artworks.image_id, name,first_release_date,total_rating,summary,cover.*;"); + var response = new ResultResponse { MediaType = MediaTypes.Game, @@ -65,9 +66,9 @@ public async Task SearchGameByIdAsync(string id) public async Task GetArtworksByGameIdAsync(string id) { - var r = await _serviceClient.QueryAsync(IGDBClient.Endpoints.Games, - $"fields id, artworks.image_id; where id = {id};"); - return r.First().Artworks.Values; + var r = await _serviceClient.QueryAsync(IGDBClient.Endpoints.Artworks, + $"fields image_id; where game = {id};"); + return r; } public static ObservableCollection ExtractGameDetailsIntoListItem(Game[] result) {