diff options
author | Chocobozzz <me@florianbigard.com> | 2020-03-10 14:49:02 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-03-10 16:18:29 +0100 |
commit | 7b81edc854902a536083298472bf92bb6726edcf (patch) | |
tree | 822dae6b6d4755ac9afffe2569b74dcb45da5535 /server/models/video/video-format-utils.ts | |
parent | 8319d6ae72d4da6de51bd3d4b5c68040fc8dc3b4 (diff) | |
download | PeerTube-7b81edc854902a536083298472bf92bb6726edcf.tar.gz PeerTube-7b81edc854902a536083298472bf92bb6726edcf.tar.zst PeerTube-7b81edc854902a536083298472bf92bb6726edcf.zip |
Video file metadata PR cleanup
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 21f0e0a68..365c9581e 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -181,6 +181,8 @@ function videoFilesModelToFormattedJSON ( | |||
181 | baseUrlWs: string, | 181 | baseUrlWs: string, |
182 | videoFiles: MVideoFileRedundanciesOpt[] | 182 | videoFiles: MVideoFileRedundanciesOpt[] |
183 | ): VideoFile[] { | 183 | ): VideoFile[] { |
184 | const video = extractVideo(model) | ||
185 | |||
184 | return videoFiles | 186 | return videoFiles |
185 | .map(videoFile => { | 187 | .map(videoFile => { |
186 | return { | 188 | return { |
@@ -195,7 +197,7 @@ function videoFilesModelToFormattedJSON ( | |||
195 | torrentDownloadUrl: model.getTorrentDownloadUrl(videoFile, baseUrlHttp), | 197 | torrentDownloadUrl: model.getTorrentDownloadUrl(videoFile, baseUrlHttp), |
196 | fileUrl: model.getVideoFileUrl(videoFile, baseUrlHttp), | 198 | fileUrl: model.getVideoFileUrl(videoFile, baseUrlHttp), |
197 | fileDownloadUrl: model.getVideoFileDownloadUrl(videoFile, baseUrlHttp), | 199 | fileDownloadUrl: model.getVideoFileDownloadUrl(videoFile, baseUrlHttp), |
198 | metadataUrl: videoFile.metadataUrl // only send the metadataUrl and not the metadata over the wire | 200 | metadataUrl: video.getVideoFileMetadataUrl(videoFile, baseUrlHttp) |
199 | } as VideoFile | 201 | } as VideoFile |
200 | }) | 202 | }) |
201 | .sort((a, b) => { | 203 | .sort((a, b) => { |