aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-05 16:15:51 +0200
committerChocobozzz <me@florianbigard.com>2018-04-05 16:15:51 +0200
commita8462c8e3a61f4f7314fe18c0c10cc2946c254d1 (patch)
treeb5330cf0a8c313277f83263724c2a70b2f246c0f /server/models/video/video.ts
parent3d3441d6c7a5646388ab0a77acad57fdb63b9d32 (diff)
downloadPeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.tar.gz
PeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.tar.zst
PeerTube-a8462c8e3a61f4f7314fe18c0c10cc2946c254d1.zip
Automatic resolution according to user bandwidth V1
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 2a1226f6d..8b58b393b 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -28,7 +28,7 @@ import {
28} from 'sequelize-typescript' 28} from 'sequelize-typescript'
29import { VideoPrivacy, VideoResolution } from '../../../shared' 29import { VideoPrivacy, VideoResolution } from '../../../shared'
30import { VideoTorrentObject } from '../../../shared/models/activitypub/objects' 30import { VideoTorrentObject } from '../../../shared/models/activitypub/objects'
31import { Video, VideoDetails } from '../../../shared/models/videos' 31import { Video, VideoDetails, VideoFile } from '../../../shared/models/videos'
32import { VideoFilter } from '../../../shared/models/videos/video-query.type' 32import { VideoFilter } from '../../../shared/models/videos/video-query.type'
33import { activityPubCollection } from '../../helpers/activitypub' 33import { activityPubCollection } from '../../helpers/activitypub'
34import { 34import {
@@ -1020,7 +1020,7 @@ export class VideoModel extends Model<VideoModel> {
1020 size: videoFile.size, 1020 size: videoFile.size,
1021 torrentUrl: this.getTorrentUrl(videoFile, baseUrlHttp), 1021 torrentUrl: this.getTorrentUrl(videoFile, baseUrlHttp),
1022 fileUrl: this.getVideoFileUrl(videoFile, baseUrlHttp) 1022 fileUrl: this.getVideoFileUrl(videoFile, baseUrlHttp)
1023 } 1023 } as VideoFile
1024 }) 1024 })
1025 .sort((a, b) => { 1025 .sort((a, b) => {
1026 if (a.resolution.id < b.resolution.id) return 1 1026 if (a.resolution.id < b.resolution.id) return 1