import { autoBlacklistVideoIfNeeded } from '../video-blacklist'
import { ActorFollowScoreCache } from '../files-cache'
import {
- MAccountActor,
+ MAccountIdActor,
MChannelAccountLight,
MChannelDefault,
MChannelId,
MVideo,
- MVideoAccountAllFiles,
MVideoAccountLight,
+ MVideoAccountLightBlacklistAllFiles,
MVideoAP,
MVideoAPWithoutCaption,
MVideoFile,
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'
}
async function updateVideoFromAP (options: {
- video: MVideoAccountAllFiles,
+ video: MVideoAccountLightBlacklistAllFiles,
videoObject: VideoTorrentObject,
- account: MAccountActor,
+ account: MAccountIdActor,
channel: MChannelDefault,
overrideTo?: string[]
}) {
// 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 {