Browse Source

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

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
6063987f02

+ 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 {
 	for _, sub := range matchedSubs {
 		subUrl := path_helper.ChangePhysicalPathToSharePath(sub, movieInfo.MainRootDirFPath, desUrl)
 		subUrl := path_helper.ChangePhysicalPathToSharePath(sub, movieInfo.MainRootDirFPath, desUrl)
 		movieSubsInfo.SubUrlList = append(movieSubsInfo.SubUrlList, subUrl)
 		movieSubsInfo.SubUrlList = append(movieSubsInfo.SubUrlList, subUrl)
+		movieSubsInfo.SubFPathList = append(movieSubsInfo.SubFPathList, sub)
 	}
 	}
 
 
 	c.JSON(http.StatusOK, movieSubsInfo)
 	c.JSON(http.StatusOK, movieSubsInfo)

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

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