X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fvideos.ts;h=c318978fd4fbeb4310b8eacff032e5ffa76ef062;hb=0b5c385b4529f3bef8f9523de3f9470ffa58f5f5;hp=035994da835a5d48ec77e1013248b619df490d46;hpb=96ca24f00e5ae5471dee9ee596489fe50af2b46f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 035994da8..c318978fd 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -53,13 +53,13 @@ import { FilteredModelAttributes } from '../../typings/sequelize' import { autoBlacklistVideoIfNeeded } from '../video-blacklist' import { ActorFollowScoreCache } from '../files-cache' import { - MAccountActor, + MAccountIdActor, MChannelAccountLight, MChannelDefault, MChannelId, MVideo, - MVideoAccountAllFiles, MVideoAccountLight, + MVideoAccountLightBlacklistAllFiles, MVideoAP, MVideoAPWithoutCaption, MVideoFile, @@ -213,19 +213,19 @@ function getOrCreateVideoAndAccountAndChannel (options: { syncParam?: SyncParam, fetchType?: 'all', allowRefresh?: boolean -}): Promise<{ video: MVideoAccountAllFiles, created: boolean, autoBlacklisted?: boolean }> +}): Promise<{ video: MVideoAccountLightBlacklistAllFiles, created: boolean, autoBlacklisted?: boolean }> function getOrCreateVideoAndAccountAndChannel (options: { videoObject: { id: string } | string, syncParam?: SyncParam, fetchType?: VideoFetchByUrlType, allowRefresh?: boolean -}): Promise<{ video: MVideoAccountAllFiles | MVideoThumbnail, created: boolean, autoBlacklisted?: boolean }> +}): Promise<{ video: MVideoAccountLightBlacklistAllFiles | MVideoThumbnail, created: boolean, autoBlacklisted?: boolean }> async function getOrCreateVideoAndAccountAndChannel (options: { videoObject: { id: string } | string, syncParam?: SyncParam, fetchType?: VideoFetchByUrlType, allowRefresh?: boolean // true by default -}): Promise<{ video: MVideoAccountAllFiles | MVideoThumbnail, created: boolean, autoBlacklisted?: boolean }> { +}): Promise<{ video: MVideoAccountLightBlacklistAllFiles | MVideoThumbnail, created: boolean, autoBlacklisted?: boolean }> { // Default params const syncParam = options.syncParam || { likes: true, dislikes: true, shares: true, comments: true, thumbnail: true, refreshVideo: false } const fetchType = options.fetchType || 'all' @@ -263,9 +263,9 @@ async function getOrCreateVideoAndAccountAndChannel (options: { } async function updateVideoFromAP (options: { - video: MVideoAccountAllFiles, + video: MVideoAccountLightBlacklistAllFiles, videoObject: VideoTorrentObject, - account: MAccountActor, + account: MAccountIdActor, channel: MChannelDefault, overrideTo?: string[] }) { @@ -420,7 +420,7 @@ async function refreshVideoIfNeeded (options: { // We need more attributes if the argument video was fetched with not enough joints const video = options.fetchedType === 'all' - ? options.video as MVideoAccountAllFiles + ? options.video as MVideoAccountLightBlacklistAllFiles : await VideoModel.loadByUrlAndPopulateAccount(options.video.url) try {