Commit 4d166ad5f9

4d166ad5f98377685a9dd47a0aaed547e67d79ce

parent: 0a6260b2e0

Unsigned

lost+skunk <skunky@ebloid.ru> · 2024-07-13 18:40 UTC

Небольшие допилы

Layout: unified · split

deviantion.go +8 −1
@@ -24,6 +24,7 @@ func (t *time) UnmarshalJSON(b []byte) (err error) {
2424type Deviation struct {
2525 Title, Url, License string
2626 PublishedTime time
27 ID int `json:"deviationId"`
2728
2829 NSFW bool `json:"isMature"`
2930 AI bool `json:"isAiGenerated"`
@@ -40,6 +41,12 @@ type Deviation struct {
4041 Tags []struct {
4142 Name string
4243 }
44 OriginalFile struct {
45 Type string
46 Width int
47 Height int
48 Filesize int
49 }
4350 DescriptionText Text
4451 RelatedContent []struct {
4552 Deviations []Deviation
@@ -89,7 +96,7 @@ func UrlFromMedia(m Media) string {
8996 if t.T == "fullview" {
9097 url.WriteString(m.BaseUri)
9198 if m.BaseUri[len(m.BaseUri)-3:] != "gif" && t.W*t.H < 33177600 {
92 url.WriteString("/v1/fill/w_")
99 url.WriteString("/v1/fit/w_")
93100 url.WriteString(strconv.Itoa(t.W))
94101 url.WriteString(",h_")
95102 url.WriteString(strconv.Itoa(t.H))
user-group.go +2
@@ -79,7 +79,9 @@ type Gallery struct {
7979 HasMore bool
8080 Results []struct {
8181 FolderId int
82 Size int
8283 Name string
84 Thumb Deviation
8385 }
8486 }
8587