]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/videos/refresh.ts
Add ability to search playlists
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / videos / refresh.ts
index 71a4e75b0b12520b9a2a8b5cd12b8f8ce2604785..a7b82f2863b6d5dec25415365ff8f7e53933663b 100644 (file)
@@ -1,7 +1,7 @@
 import { logger, loggerTagsFactory } from '@server/helpers/logger'
 import { PeerTubeRequestError } from '@server/helpers/requests'
-import { VideoFetchByUrlType } from '@server/helpers/video'
 import { ActorFollowScoreCache } from '@server/lib/files-cache'
+import { VideoLoadByUrlType } from '@server/lib/model-loaders'
 import { VideoModel } from '@server/models/video/video'
 import { MVideoAccountLightBlacklistAllFiles, MVideoThumbnail } from '@server/types/models'
 import { HttpStatusCode } from '@shared/core-utils'
@@ -10,7 +10,7 @@ import { APVideoUpdater } from './updater'
 
 async function refreshVideoIfNeeded (options: {
   video: MVideoThumbnail
-  fetchedType: VideoFetchByUrlType
+  fetchedType: VideoLoadByUrlType
   syncParam: SyncParam
 }): Promise<MVideoThumbnail> {
   if (!options.video.isOutdated()) return options.video
@@ -22,6 +22,8 @@ async function refreshVideoIfNeeded (options: {
 
   const lTags = loggerTagsFactory('ap', 'video', 'refresh', video.uuid, video.url)
 
+  logger.info('Refreshing video %s.', video.url, lTags())
+
   try {
     const { videoObject } = await fetchRemoteVideo(video.url)