From 4d166ad5f98377685a9dd47a0aaed547e67d79ce Mon Sep 17 00:00:00 2001 From: lost+skunk Date: Sat, 13 Jul 2024 21:40:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B4=D0=BE=D0=BF=D0=B8=D0=BB=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deviantion.go | 9 ++++++++- user-group.go | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/deviantion.go b/deviantion.go index e955b12..2f9410f 100644 --- a/deviantion.go +++ b/deviantion.go @@ -24,6 +24,7 @@ func (t *time) UnmarshalJSON(b []byte) (err error) { type Deviation struct { Title, Url, License string PublishedTime time + ID int `json:"deviationId"` NSFW bool `json:"isMature"` AI bool `json:"isAiGenerated"` @@ -40,6 +41,12 @@ type Deviation struct { Tags []struct { Name string } + OriginalFile struct { + Type string + Width int + Height int + Filesize int + } DescriptionText Text RelatedContent []struct { Deviations []Deviation @@ -89,7 +96,7 @@ func UrlFromMedia(m Media) string { if t.T == "fullview" { url.WriteString(m.BaseUri) if m.BaseUri[len(m.BaseUri)-3:] != "gif" && t.W*t.H < 33177600 { - url.WriteString("/v1/fill/w_") + url.WriteString("/v1/fit/w_") url.WriteString(strconv.Itoa(t.W)) url.WriteString(",h_") url.WriteString(strconv.Itoa(t.H)) diff --git a/user-group.go b/user-group.go index bfa1971..1592568 100644 --- a/user-group.go +++ b/user-group.go @@ -79,7 +79,9 @@ type Gallery struct { HasMore bool Results []struct { FolderId int + Size int Name string + Thumb Deviation } }