aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 7b1f0bc31..e62bde344 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -121,18 +121,18 @@ import { createTorrentPromise } from '../../helpers/webtorrent'
121import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' 121import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
122import { 122import {
123 MChannel, 123 MChannel,
124 MChannelActorAccountDefault, 124 MChannelAccountDefault,
125 MChannelId, 125 MChannelId,
126 MUserAccountId, 126 MUserAccountId,
127 MUserId, 127 MUserId,
128 MVideoAccountAllFiles,
129 MVideoAccountLight, 128 MVideoAccountLight,
129 MVideoAccountLightBlacklistAllFiles,
130 MVideoDetails, 130 MVideoDetails,
131 MVideoForUser,
131 MVideoFullLight, 132 MVideoFullLight,
132 MVideoIdThumbnail, 133 MVideoIdThumbnail,
133 MVideoThumbnail, 134 MVideoThumbnail,
134 MVideoWithAllFiles, 135 MVideoWithAllFiles,
135 MVideoWithBlacklistThumbnailScheduled,
136 MVideoWithRights 136 MVideoWithRights
137} from '../../typings/models' 137} from '../../typings/models'
138import { MVideoFile, MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' 138import { MVideoFile, MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file'
@@ -1015,7 +1015,7 @@ export class VideoModel extends Model<VideoModel> {
1015 AccountModel 1015 AccountModel
1016 ], 1016 ],
1017 transaction: options.transaction 1017 transaction: options.transaction
1018 }) as MChannelActorAccountDefault 1018 }) as MChannelAccountDefault
1019 } 1019 }
1020 1020
1021 return sendDeleteVideo(instance, options.transaction) 1021 return sendDeleteVideo(instance, options.transaction)
@@ -1209,10 +1209,10 @@ export class VideoModel extends Model<VideoModel> {
1209 1209
1210 return Promise.all([ 1210 return Promise.all([
1211 VideoModel.count(countQuery), 1211 VideoModel.count(countQuery),
1212 VideoModel.scope(findScopes).findAll(findQuery) 1212 VideoModel.scope(findScopes).findAll<MVideoForUser>(findQuery)
1213 ]).then(([ count, rows ]) => { 1213 ]).then(([ count, rows ]) => {
1214 return { 1214 return {
1215 data: rows as MVideoWithBlacklistThumbnailScheduled[], 1215 data: rows,
1216 total: count 1216 total: count
1217 } 1217 }
1218 }) 1218 })
@@ -1468,7 +1468,7 @@ export class VideoModel extends Model<VideoModel> {
1468 return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(query) 1468 return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(query)
1469 } 1469 }
1470 1470
1471 static loadByUrlAndPopulateAccount (url: string, transaction?: Transaction): Bluebird<MVideoAccountAllFiles> { 1471 static loadByUrlAndPopulateAccount (url: string, transaction?: Transaction): Bluebird<MVideoAccountLightBlacklistAllFiles> {
1472 const query: FindOptions = { 1472 const query: FindOptions = {
1473 where: { 1473 where: {
1474 url 1474 url