aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorArman <Arman1371@gmail.com>2020-11-11 23:14:58 +0330
committerGitHub <noreply@github.com>2020-11-11 20:44:58 +0100
commitb8fa24491c37fd7c0cca562a9469dfb254171919 (patch)
treeacc5b3aff0dbe060685210d6afb94ce9d16e0312 /server/models
parenta30995fc27e697359d195e5c03127034d9c4e7ca (diff)
downloadPeerTube-b8fa24491c37fd7c0cca562a9469dfb254171919.tar.gz
PeerTube-b8fa24491c37fd7c0cca562a9469dfb254171919.tar.zst
PeerTube-b8fa24491c37fd7c0cca562a9469dfb254171919.zip
remove duplicate file checks in video model (#3289)
- server/models/video/video.ts (delete duplicate): build duplicate file id addition in buildAPIResult
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts7
1 files changed, 0 insertions, 7 deletions
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<VideoModel> {
1657 videoFilesDone.add(row.VideoFiles.id) 1657 videoFilesDone.add(row.VideoFiles.id)
1658 } 1658 }
1659 1659
1660 if (row.VideoFiles?.id && !videoFilesDone.has(row.VideoFiles.id)) {
1661 const videoFileModel = new VideoFileModel(pick(row.VideoFiles, videoFileKeys))
1662 videoModel.VideoFiles.push(videoFileModel)
1663
1664 videoFilesDone.add(row.VideoFiles.id)
1665 }
1666
1667 if (row.VideoStreamingPlaylists?.id && !videoStreamingPlaylistMemo[row.VideoStreamingPlaylists.id]) { 1660 if (row.VideoStreamingPlaylists?.id && !videoStreamingPlaylistMemo[row.VideoStreamingPlaylists.id]) {
1668 const streamingPlaylist = new VideoStreamingPlaylistModel(pick(row.VideoStreamingPlaylists, videoStreamingPlaylistKeys)) 1661 const streamingPlaylist = new VideoStreamingPlaylistModel(pick(row.VideoStreamingPlaylists, videoStreamingPlaylistKeys))
1669 streamingPlaylist.VideoFiles = [] 1662 streamingPlaylist.VideoFiles = []