diff --git a/openapi/components/subject_v0.yaml b/openapi/components/subject_v0.yaml index d6ce9392..9ef2e9e4 100644 --- a/openapi/components/subject_v0.yaml +++ b/openapi/components/subject_v0.yaml @@ -54,6 +54,10 @@ properties: title: Platform type: string description: TV, Web, 欧美剧, DLC... + image: + title: Image + type: string + description: large image url images: $ref: "./subject_image.yaml" infobox: diff --git a/web/res/subject.go b/web/res/subject.go index 840f3e2a..3a69fe19 100644 --- a/web/res/subject.go +++ b/web/res/subject.go @@ -44,7 +44,8 @@ type SubjectTag struct { type SubjectV0 struct { Date *string `json:"date"` Platform *string `json:"platform"` - Image SubjectImages `json:"images"` + Images SubjectImages `json:"images"` + Image *string `json:"image"` Summary string `json:"summary"` Name string `json:"name"` NameCN string `json:"name_cn"` @@ -124,10 +125,12 @@ func platformString(s model.Subject) *string { } func ToSubjectV0(s model.Subject, totalEpisode int64, metaTags []tag.Tag) SubjectV0 { + images := SubjectImage(s.Image) return SubjectV0{ TotalEpisodes: totalEpisode, ID: s.ID, - Image: SubjectImage(s.Image), + Image: &images.Large, + Images: images, Summary: s.Summary, Name: s.Name, Platform: platformString(s),