Merge branch 'dev-ars' into dev
This commit is contained in:
commit
cfb2523cfd
3 changed files with 8 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi.
|
||||||
|
|
||||||
oapi_title := oapi.Title{
|
oapi_title := oapi.Title{
|
||||||
EpisodesAired: title.EpisodesAired,
|
EpisodesAired: title.EpisodesAired,
|
||||||
EpisodesAll: title.EpisodesAired,
|
EpisodesAll: title.EpisodesAll,
|
||||||
// EpisodesLen: &episodes_lens,
|
// EpisodesLen: &episodes_lens,
|
||||||
Id: title.ID,
|
Id: title.ID,
|
||||||
// Poster: &oapi_image,
|
// Poster: &oapi_image,
|
||||||
|
|
@ -41,6 +41,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return oapi.Title{}, fmt.Errorf("unmarshal TitleNames: %v", err)
|
return oapi.Title{}, fmt.Errorf("unmarshal TitleNames: %v", err)
|
||||||
}
|
}
|
||||||
|
oapi_title.TitleNames = title_names
|
||||||
|
|
||||||
if len(title.EpisodesLen) > 0 {
|
if len(title.EpisodesLen) > 0 {
|
||||||
episodes_lens := make(map[string]float64, 0)
|
episodes_lens := make(map[string]float64, 0)
|
||||||
|
|
@ -56,6 +57,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return oapi.Title{}, fmt.Errorf("unmarshalling title_tag: %v", err)
|
return oapi.Title{}, fmt.Errorf("unmarshalling title_tag: %v", err)
|
||||||
}
|
}
|
||||||
|
oapi_title.Tags = oapi_tag_names
|
||||||
|
|
||||||
var oapi_studio oapi.Studio
|
var oapi_studio oapi.Studio
|
||||||
if title.StudioName != nil {
|
if title.StudioName != nil {
|
||||||
|
|
@ -80,6 +82,7 @@ func (s Server) mapTitle(ctx context.Context, title sqlc.GetTitleByIDRow) (oapi.
|
||||||
oapi_image.ImagePath = title.TitleImagePath
|
oapi_image.ImagePath = title.TitleImagePath
|
||||||
oapi_image.StorageType = &title.TitleStorageType
|
oapi_image.StorageType = &title.TitleStorageType
|
||||||
}
|
}
|
||||||
|
oapi_title.Poster = &oapi_image
|
||||||
|
|
||||||
var release_season oapi.ReleaseSeason
|
var release_season oapi.ReleaseSeason
|
||||||
if title.ReleaseSeason != nil {
|
if title.ReleaseSeason != nil {
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,8 @@ func (s Server) GetTitles(ctx context.Context, request oapi.GetTitlesRequestObje
|
||||||
// EpisodesLen: title.EpisodesLen,
|
// EpisodesLen: title.EpisodesLen,
|
||||||
TitleStorageType: title.TitleStorageType,
|
TitleStorageType: title.TitleStorageType,
|
||||||
TitleImagePath: title.TitleImagePath,
|
TitleImagePath: title.TitleImagePath,
|
||||||
TagNames: title.TitleNames,
|
TitleNames: title.TitleNames,
|
||||||
|
TagNames: title.TagNames,
|
||||||
StudioName: title.StudioName,
|
StudioName: title.StudioName,
|
||||||
// StudioIllustID: title.StudioIllustID,
|
// StudioIllustID: title.StudioIllustID,
|
||||||
// StudioDesc: title.StudioDesc,
|
// StudioDesc: title.StudioDesc,
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,9 @@ func (s Server) mapUsertitle(ctx context.Context, t sqlc.SearchUserTitlesRow) (o
|
||||||
// EpisodesLen: title.EpisodesLen,
|
// EpisodesLen: title.EpisodesLen,
|
||||||
TitleStorageType: t.TitleStorageType,
|
TitleStorageType: t.TitleStorageType,
|
||||||
TitleImagePath: t.TitleImagePath,
|
TitleImagePath: t.TitleImagePath,
|
||||||
TagNames: t.TitleNames,
|
|
||||||
StudioName: t.StudioName,
|
StudioName: t.StudioName,
|
||||||
|
TitleNames: t.TitleNames,
|
||||||
|
TagNames: t.TagNames,
|
||||||
// StudioIllustID: title.StudioIllustID,
|
// StudioIllustID: title.StudioIllustID,
|
||||||
// StudioDesc: title.StudioDesc,
|
// StudioDesc: title.StudioDesc,
|
||||||
// StudioStorageType: title.StudioStorageType,
|
// StudioStorageType: title.StudioStorageType,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue