From b8fa24491c37fd7c0cca562a9469dfb254171919 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 11 Nov 2020 23:14:58 +0330 Subject: remove duplicate file checks in video model (#3289) - server/models/video/video.ts (delete duplicate): build duplicate file id addition in buildAPIResult --- server/models/video/video.ts | 7 ------- 1 file changed, 7 deletions(-) (limited to 'server') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 60f295056..70839aa89 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1657,13 +1657,6 @@ export class VideoModel extends Model { videoFilesDone.add(row.VideoFiles.id) } - if (row.VideoFiles?.id && !videoFilesDone.has(row.VideoFiles.id)) { - const videoFileModel = new VideoFileModel(pick(row.VideoFiles, videoFileKeys)) - videoModel.VideoFiles.push(videoFileModel) - - videoFilesDone.add(row.VideoFiles.id) - } - if (row.VideoStreamingPlaylists?.id && !videoStreamingPlaylistMemo[row.VideoStreamingPlaylists.id]) { const streamingPlaylist = new VideoStreamingPlaylistModel(pick(row.VideoStreamingPlaylists, videoStreamingPlaylistKeys)) streamingPlaylist.VideoFiles = [] -- cgit v1.2.3