From c663144881ce47b365cdd0c3f32ced8c9c18e0b7 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Wed, 13 Dec 2023 00:28:03 +0800 Subject: [PATCH] fix: new person relation --- pkg/vars/index.go | 5 ++- pkg/vars/staff.go.json | 76 +++++++++++++++++++++++++++++++++----- web/handler/subject/get.go | 2 +- 3 files changed, 70 insertions(+), 13 deletions(-) diff --git a/pkg/vars/index.go b/pkg/vars/index.go index 6fb142cca..27554be1b 100644 --- a/pkg/vars/index.go +++ b/pkg/vars/index.go @@ -20,6 +20,7 @@ package vars import ( _ "embed" "encoding/json" + "fmt" "log" "github.com/bangumi/server/internal/model" @@ -99,7 +100,7 @@ type Relation struct { Description string `json:"description"` } -func (r Relation) String() string { +func (r Relation) String(id uint16) string { switch { case r.CN != "": return r.CN @@ -108,6 +109,6 @@ func (r Relation) String() string { case r.EN != "": return r.EN default: - return "unknown" + return fmt.Sprintf("unknown(%d)", id) } } diff --git a/pkg/vars/staff.go.json b/pkg/vars/staff.go.json index 37a24cef0..198929657 100644 --- a/pkg/vars/staff.go.json +++ b/pkg/vars/staff.go.json @@ -80,22 +80,12 @@ "JP": "コンテ ストーリーボード 画コンテ 絵コンテ", "RDF": "" }, - "89": { - "EN": "Chief Episode Direction", - "CN": "主演出'", - "JP": "チーフ演出" - }, "5": { "CN": "演出", "EN": "Episode Director", "JP": "", "RDF": "" }, - "91": { - "en": "Assistant Episode Direction", - "cn": "演出助理", - "jp": "演出助手 演出補佐 演出協力" - }, "6": { "CN": "音乐", "EN": "Music", @@ -515,6 +505,72 @@ "EN": "Action Animation Direction", "JP": "アクション作画監督", "RDF": "" + }, + "80": { + "cn": "监制", + "jp": "", + "en": "Supervising Producer" + }, + "81": { + "en": "Assistance", + "cn": "协力", + "jp": "協力" + }, + "82": { + "en": "Photography", + "cn": "摄影", + "jp": "撮影" + }, + "83": { + "en": "Assistant Production Manager Assistance", + "cn": "制作进行协力", + "jp": "制作進行協力" + }, + "84": { + "en": "Design Manager", + "cn": "设定制作", + "jp": "設定制作 制作設定", + "desc": "有时需要额外的设计工作,联系负责部门并监督工作确保交付" + }, + "85": { + "en": "Music Producer", + "cn": "音乐制作人", + "jp": "音楽プロデューサー" + }, + "86": { + "en": "3DCG Director", + "cn": "3DCG 导演", + "jp": "3DCG 監督" + }, + "87": { + "en": "Animation Producer", + "cn": "动画制片人", + "jp": "アニメプロデューサー アニメーションプロデューサー" + }, + "88": { + "en": "Special Effects Animation Direction", + "cn": "特效作画监督", + "jp": "エフェクト作画監督" + }, + "89": { + "en": "Chief Episode Direction", + "cn": "主演出", + "jp": "チーフ演出" + }, + "90": { + "en": "Assistant Animation Direction", + "cn": "作画监督助理", + "jp": "作画監督補佐" + }, + "91": { + "en": "Assistant Episode Direction", + "cn": "演出助理", + "jp": "演出助手 演出補佐 演出協力" + }, + "92": { + "en": "Main Animator", + "cn": "主动画师", + "jp": "メインアニメーター" } }, "3": { diff --git a/web/handler/subject/get.go b/web/handler/subject/get.go index 5b8e3ca4e..6e57bfbc4 100644 --- a/web/handler/subject/get.go +++ b/web/handler/subject/get.go @@ -170,5 +170,5 @@ func readableRelation(destSubjectType model.SubjectType, relation uint16) string return model.SubjectTypeString(destSubjectType) } - return r.String() + return r.String(relation) }