Skip to content

Commit bbd262c

Browse files
committed
extract items array from json response
1 parent 3409ce2 commit bbd262c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

RomM.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using System.Reflection;
1515
using System.Linq;
1616
using Newtonsoft.Json;
17+
using Newtonsoft.Json.Linq;
1718
using RomM.Settings;
1819
using Playnite.SDK.Events;
1920
using RomM.Games;
@@ -277,7 +278,8 @@ public override IEnumerable<GameMetadata> GetGames(LibraryGetGamesArgs args)
277278
using (StreamReader reader = new StreamReader(body))
278279
using (JsonTextReader jsonReader = new JsonTextReader(reader))
279280
{
280-
roms = JsonSerializerSingleton.Instance.Deserialize<List<RomMRom>>(jsonReader);
281+
var jsonResponse = JObject.Parse(reader.ReadToEnd());
282+
roms = jsonResponse["items"].ToObject<List<RomMRom>>();
281283
}
282284

283285
Logger.Debug($"Finished parsing response for {apiPlatform.Name}.");

0 commit comments

Comments
 (0)