Skip to content

Commit

Permalink
remove duplicate file checks in video model (#3289)
Browse files Browse the repository at this point in the history
- server/models/video/video.ts (delete duplicate): build duplicate file id addition in buildAPIResult
  • Loading branch information
Arman92 authored Nov 11, 2020
1 parent a30995f commit b8fa244
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions server/models/video/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,13 +1657,6 @@ export class VideoModel extends Model<VideoModel> {
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 = []
Expand Down

0 comments on commit b8fa244

Please sign in to comment.