X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo.ts;h=1a10d2da229ec59d4d8484fc582cea90dbbc07e3;hb=32fde390f465b9ceef9e49c4037acdacbe176d65;hp=56cc45cfeda4d8a7b370cb669db023ae9b420230;hpb=77239b425a8e00822a53c9907415832a473c3eb6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 56cc45cfe..1a10d2da2 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -32,7 +32,7 @@ import { getHLSDirectory, getHLSRedundancyDirectory, getHlsResolutionPlaylistFil import { VideoPathManager } from '@server/lib/video-path-manager' import { isVideoInPrivateDirectory } from '@server/lib/video-privacy' import { getServerActor } from '@server/models/application/application' -import { ModelCache } from '@server/models/model-cache' +import { ModelCache } from '@server/models/shared/model-cache' import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' import { ffprobePromise, getAudioStream, hasAudioStream, uuidToShort } from '@shared/extra-utils' import { @@ -103,10 +103,9 @@ import { VideoRedundancyModel } from '../redundancy/video-redundancy' import { ServerModel } from '../server/server' import { TrackerModel } from '../server/tracker' import { VideoTrackerModel } from '../server/video-tracker' -import { setAsUpdated } from '../shared' +import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, setAsUpdated, throwIfNotValid } from '../shared' import { UserModel } from '../user/user' import { UserVideoHistoryModel } from '../user/user-video-history' -import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils' import { VideoViewModel } from '../view/video-view' import { videoFilesModelToFormattedJSON, @@ -1871,7 +1870,7 @@ export class VideoModel extends Model>> { } setAsRefreshed (transaction?: Transaction) { - return setAsUpdated('video', this.id, transaction) + return setAsUpdated({ sequelize: this.sequelize, table: 'video', id: this.id, transaction }) } // ---------------------------------------------------------------------------