import { ActorModel } from '../../models/activitypub/actor'
import { TagModel } from '../../models/video/tag'
import { VideoModel } from '../../models/video/video'
-import { VideoChannelModel } from '../../models/video/video-channel'
import { VideoFileModel } from '../../models/video/video-file'
import { getOrCreateActorAndServerAndModel } from './actor'
import { addVideoComments } from './video-comments'
import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
import { join } from 'path'
import { FilteredModelAttributes } from '../../typings/sequelize'
-import { Hooks } from '../plugins/hooks'
import { autoBlacklistVideoIfNeeded } from '../video-blacklist'
import { ActorFollowScoreCache } from '../files-cache'
+import { AccountModelIdActor, VideoChannelModelId, VideoChannelModelIdActor } from '../../typings/models'
async function federateVideoIfNeeded (video: VideoModel, isNewVideo: boolean, transaction?: sequelize.Transaction) {
if (
async function updateVideoFromAP (options: {
video: VideoModel,
videoObject: VideoTorrentObject,
- account: AccountModel,
- channel: VideoChannelModel,
+ account: AccountModelIdActor,
+ channel: VideoChannelModelIdActor,
overrideTo?: string[]
}) {
const { video, videoObject, account, channel, overrideTo } = options
}
async function videoActivityObjectToDBAttributes (
- videoChannel: VideoChannelModel,
+ videoChannel: VideoChannelModelId,
videoObject: VideoTorrentObject,
to: string[] = []
) {