diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-29 11:32:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-29 11:33:27 +0200 |
commit | 12d84abeca4917d2f1e3f308010bfcd56d37cb7c (patch) | |
tree | 95c6b42ed4af5fa81afd2f8ff0d6520bcbf9bd48 /server/models/video | |
parent | 5a9a56b78f6a62b3241f0dff1b8685001a3b3a1d (diff) | |
download | PeerTube-12d84abeca4917d2f1e3f308010bfcd56d37cb7c.tar.gz PeerTube-12d84abeca4917d2f1e3f308010bfcd56d37cb7c.tar.zst PeerTube-12d84abeca4917d2f1e3f308010bfcd56d37cb7c.zip |
Include video file id in API
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/formatter/video-format-utils.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/models/video/formatter/video-format-utils.ts b/server/models/video/formatter/video-format-utils.ts index fd02f8c64..e1b0eb610 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts | |||
@@ -256,6 +256,8 @@ function videoFilesModelToFormattedJSON ( | |||
256 | .sort(sortByResolutionDesc) | 256 | .sort(sortByResolutionDesc) |
257 | .map(videoFile => { | 257 | .map(videoFile => { |
258 | return { | 258 | return { |
259 | id: videoFile.id, | ||
260 | |||
259 | resolution: { | 261 | resolution: { |
260 | id: videoFile.resolution, | 262 | id: videoFile.resolution, |
261 | label: videoFile.resolution === 0 ? 'Audio' : `${videoFile.resolution}p` | 263 | label: videoFile.resolution === 0 ? 'Audio' : `${videoFile.resolution}p` |