From 5a965d4f75caa538d2fe69f0504865bf1bbda962 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 8 Mar 2024 01:38:07 +0800 Subject: [PATCH] by Robin at 20240308 --- app/mix/controller/streamer_api.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/mix/controller/streamer_api.go b/app/mix/controller/streamer_api.go index a039ae35..25451200 100644 --- a/app/mix/controller/streamer_api.go +++ b/app/mix/controller/streamer_api.go @@ -223,6 +223,16 @@ func ApiGetStreamerRecommList(ctx *gin.Context) { return } + objectMediaNum := 4 // 单个主播服务总共4个媒体类 + mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum) + for i, vo := range list { + mediaFillableList[objectMediaNum*i+0] = vo.Avatar + mediaFillableList[objectMediaNum*i+1] = vo.Cover + mediaFillableList[objectMediaNum*i+2] = vo.Shorts + mediaFillableList[objectMediaNum*i+3] = vo.Album + } + mediafiller.FillList(ctx, mediaFillableList) + data := &streamerproto.ApiRecommListData{ RecommList: list, }