浏览代码

在单个电影获取字幕列表的时候,同时也返回绝对路径

Signed-off-by: allan716 <[email protected]>
allan716 3 年之前
父节点
当前提交
6063987f02
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      internal/backend/controllers/v1/video_list_v2.go
  2. 2 1
      pkg/types/backend/reply_movie_list.go

+ 1 - 0
internal/backend/controllers/v1/video_list_v2.go

@@ -203,6 +203,7 @@ func (cb *ControllerBase) OneMovieSubs(c *gin.Context) {
 	for _, sub := range matchedSubs {
 		subUrl := path_helper.ChangePhysicalPathToSharePath(sub, movieInfo.MainRootDirFPath, desUrl)
 		movieSubsInfo.SubUrlList = append(movieSubsInfo.SubUrlList, subUrl)
+		movieSubsInfo.SubFPathList = append(movieSubsInfo.SubFPathList, sub)
 	}
 
 	c.JSON(http.StatusOK, movieSubsInfo)

+ 2 - 1
pkg/types/backend/reply_movie_list.go

@@ -17,5 +17,6 @@ type MovieInfoV2 struct {
 }
 
 type MovieSubsInfo struct {
-	SubUrlList []string `json:"sub_url_list"`
+	SubUrlList   []string `json:"sub_url_list"`
+	SubFPathList []string `json:"sub_f_path_list"`
 }