Skip to content

Commit

Permalink
Update Lolibooru.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiroechi committed Jan 2, 2021
1 parent ca956ab commit 9dd052f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Booru/Client/Lolibooru.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net.Http;
using System.Text.Json;

Expand Down Expand Up @@ -41,12 +42,12 @@ protected override Artist ReadArtist(JsonElement json)
urls.Add(item.GetString());
}
}

return new Artist(
uint.Parse(json.GetProperty("id").GetString()),
json.GetProperty("name").GetString(),
urls);
}
return new Artist
{
ID = json.GetProperty("id").GetUInt32(),
Name = json.GetProperty("name").GetString(),
Urls = new ReadOnlyCollection<string>(urls)
};

/// <inheritdoc/>
protected override Pool ReadPool(JsonElement json)
Expand Down

0 comments on commit 9dd052f

Please sign in to comment.