X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-file.ts;h=4aaee1ffadbf7827814a73777b1d7dc572eccf3c;hb=714e33a7428b71ef98129ce85a4bd64140bcd912;hp=6f03fae3a501bf986a7dbb774bb7e2d7800060bf;hpb=482b26231b4e39234f107b8400ef606c5f003c55;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index 6f03fae3a..4aaee1ffa 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts @@ -1,7 +1,7 @@ import { remove } from 'fs-extra' import memoizee from 'memoizee' import { join } from 'path' -import { FindOptions, Op, Transaction } from 'sequelize' +import { FindOptions, Op, Transaction, WhereOptions } from 'sequelize' import { AllowNull, BelongsTo, @@ -18,11 +18,10 @@ import { Table, UpdatedAt } from 'sequelize-typescript' -import { Where } from 'sequelize/types/lib/utils' import validator from 'validator' -import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' import { logger } from '@server/helpers/logger' import { extractVideo } from '@server/helpers/video' +import { buildRemoteVideoBaseUrl } from '@server/lib/activitypub/url' import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' import { getFSTorrentFilePath } from '@server/lib/paths' import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' @@ -70,7 +69,7 @@ export enum ScopeNames { } ] }, - [ScopeNames.WITH_VIDEO_OR_PLAYLIST]: (options: { whereVideo?: Where } = {}) => { + [ScopeNames.WITH_VIDEO_OR_PLAYLIST]: (options: { whereVideo?: WhereOptions } = {}) => { return { include: [ {