Skip to content

Commit

Permalink
Update Danbooru.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiroechi committed Jan 2, 2021
1 parent 00d473a commit 72f3692
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Booru/Template/Danbooru.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,20 @@ protected override Pool ReadPool(JsonElement json)
protected override Post ReadPost(JsonElement json)
{
return new Post
{
ID = this.PropertyExist(json, "id") ? json.GetProperty("id").GetUInt32() : 0,
PostUrl = this._BaseUrl + "posts/",
FileUrl = this.PropertyExist(json, "file_url") ? json.GetProperty("file_url").GetString() : null,
PreviewUrl = this.PropertyExist(json, "preview_file_url") ? json.GetProperty("preview_file_url").GetString() : null,
Rating = this.ConvertRating(json.GetProperty("rating").GetString()),
Tags = json.GetProperty("tag_string").GetString(),
Size = json.GetProperty("file_size").GetUInt32(),
Height = json.GetProperty("image_height").GetInt32(),
Width = json.GetProperty("image_width").GetInt32(),
PreviewHeight = 0,
PreviewWidth = 0,
Source = json.GetProperty("source").GetString()
};
(
id: this.PropertyExist(json, "id") ? json.GetProperty("id").GetUInt32() : 0,
postUrl: this._BaseUrl + "posts/",
fileUrl: this.PropertyExist(json, "file_url") ? json.GetProperty("file_url").GetString() : null,
previewUrl: this.PropertyExist(json, "preview_file_url") ? json.GetProperty("preview_file_url").GetString() : null,
rating: this.ConvertRating(json.GetProperty("rating").GetString()),
tags: json.GetProperty("tag_string").GetString(),
size: json.GetProperty("file_size").GetUInt32(),
height: json.GetProperty("image_height").GetInt32(),
width: json.GetProperty("image_width").GetInt32(),
previewHeight: 0,
previewWidth: 0,
source: json.GetProperty("source").GetString()
);
}

/// <inheritdoc/>
Expand Down

0 comments on commit 72f3692

Please sign in to comment.