Explorar o código

http api 支持提交蓝光电影,需要看对应的 http api 文档

Signed-off-by: allan716 <[email protected]>
allan716 %!s(int64=3) %!d(string=hai) anos
pai
achega
c03c8bff52

+ 10 - 7
internal/backend/controllers/v1/api.go

@@ -25,15 +25,18 @@ func (cb *ControllerBase) AddJobHandler(c *gin.Context) {
 	if err != nil {
 		return
 	}
-	// 这里视频文件得要存在
-	if my_util.IsFile(videoListAdd.PhysicalVideoFileFullPath) == false {
 
-		c.JSON(http.StatusOK, backend.ReplyJobThings{
-			Message: "physical video file not found",
-		})
-		return
-	}
+	if videoListAdd.IsBluray == false {
+		// 非蓝光的才需要检测这个文件存在
+		// 这里视频文件得要存在
+		if my_util.IsFile(videoListAdd.PhysicalVideoFileFullPath) == false {
 
+			c.JSON(http.StatusOK, backend.ReplyJobThings{
+				Message: "physical video file not found",
+			})
+			return
+		}
+	}
 	videoType := common.Movie
 	if videoListAdd.VideoType == 1 {
 		videoType = common.Series

+ 1 - 0
internal/types/backend/req_video_list_add.go

@@ -5,4 +5,5 @@ type ReqVideoListAdd struct {
 	PhysicalVideoFileFullPath string `json:"physical_video_file_full_path"` // 视频的物理路径
 	TaskPriorityLevel         int    `json:"task_priority_level"`           // 任务优先级
 	MediaServerInsideVideoID  string `json:"media_server_inside_video_id"`  // 媒体服务器内部视频ID
+	IsBluray                  bool   `json:"is_bluray"`                     // 是否是蓝光,目前只支持电影的蓝光,连续剧没有调试过
 }