diff --git a/openapi/components/subject_v0.yaml b/openapi/components/subject_v0.yaml index 7bf9df61e..0c8c3ecc7 100644 --- a/openapi/components/subject_v0.yaml +++ b/openapi/components/subject_v0.yaml @@ -10,6 +10,7 @@ required: - platform - volumes - eps + - series - total_episodes - rating - images @@ -34,6 +35,10 @@ properties: summary: title: Summary type: string + series: + title: Series + type: boolean + description: 是否为书籍系列的主条目 nsfw: title: Nsfw type: boolean @@ -47,7 +52,7 @@ properties: platform: title: Platform type: string - description: TV, Web, 欧美剧, PS4... + description: TV, Web, 欧美剧, DLC... images: $ref: "./subject_image.yaml" infobox: diff --git a/web/handler/subject/get.go b/web/handler/subject/get.go index 6e57bfbc4..e7f0f623a 100644 --- a/web/handler/subject/get.go +++ b/web/handler/subject/get.go @@ -142,6 +142,7 @@ func convertModelSubject(s model.Subject, totalEpisode int64) res.SubjectV0 { Doing: s.Doing, }, TypeID: s.TypeID, + Series: s.Series, Locked: s.Locked(), NSFW: s.NSFW, Rating: res.Rating{ diff --git a/web/res/subject.go b/web/res/subject.go index d981c87b7..39f36e54c 100644 --- a/web/res/subject.go +++ b/web/res/subject.go @@ -48,10 +48,11 @@ type SubjectV0 struct { ID model.SubjectID `json:"id"` Eps uint32 `json:"eps"` Volumes uint32 `json:"volumes"` - Redirect model.SubjectID `json:"-"` + Series bool `json:"series"` Locked bool `json:"locked"` NSFW bool `json:"nsfw"` TypeID model.SubjectType `json:"type"` + Redirect model.SubjectID `json:"-"` } type SlimSubjectV0 struct {