1
0
Эх сурвалжийг харах

修复获取一个连续剧字幕的bug

Signed-off-by: allan716 <[email protected]>
allan716 3 жил өмнө
parent
commit
d69d07146c

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

@@ -243,6 +243,9 @@ func (cb *ControllerBase) OneSeriesSubs(c *gin.Context) {
 			subUrl := path_helper.ChangePhysicalPathToSharePath(subFPath, seriesInfo.MainRootDirFPath, desUrl)
 			seasonInfo.OneVideoInfos[i].SubUrlList = append(seasonInfo.OneVideoInfos[i].SubUrlList, subUrl)
 		}
+
+		videoUrl := path_helper.ChangePhysicalPathToSharePath(videoInfo.VideoFPath, seriesInfo.MainRootDirFPath, desUrl)
+		seasonInfo.OneVideoInfos[i].VideoUrl = videoUrl
 	}
 
 	c.JSON(http.StatusOK, seasonInfo)

+ 5 - 5
pkg/search/search.go

@@ -211,11 +211,11 @@ func SeriesAllEpsAndSubtitles(l *logrus.Logger, dir string) (*backend.SeasonInfo
 	// 交叉比对,找到对应的字幕
 	for pathKey, videos := range pathVideoMap {
 
-		nowPathSubs, found := pathSubsMap[pathKey]
-		if found == false {
-			// 没有找到对应的字幕
-			continue
-		}
+		nowPathSubs, _ := pathSubsMap[pathKey]
+		//if found == false {
+		//	// 没有找到对应的字幕
+		//	continue
+		//}
 		for _, oneVideo := range videos {
 
 			videoName := strings.ReplaceAll(filepath.Base(oneVideo), filepath.Ext(oneVideo), "")