X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Ffiles-cache%2Fvideos-caption-cache.ts;h=440c3fde81c2de19c4c763ad0d217e659e4ca4f0;hb=00aab0666c6f772548c160fdfa871a8843b88f37;hp=305e39c35053d33d4dc0479f5c95992d61a55362;hpb=3acc50844047a37698f0618fa235c138e386a053;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/files-cache/videos-caption-cache.ts b/server/lib/files-cache/videos-caption-cache.ts index 305e39c35..440c3fde8 100644 --- a/server/lib/files-cache/videos-caption-cache.ts +++ b/server/lib/files-cache/videos-caption-cache.ts @@ -5,6 +5,7 @@ import { VideoCaptionModel } from '../../models/video/video-caption' import { AbstractVideoStaticFileCache } from './abstract-video-static-file-cache' import { CONFIG } from '../../initializers/config' import { logger } from '../../helpers/logger' +import { fetchRemoteVideoStaticFile } from '../activitypub' type GetPathParam = { videoId: string, language: string } @@ -49,9 +50,9 @@ class VideosCaptionCache extends AbstractVideoStaticFileCache { const remoteStaticPath = videoCaption.getCaptionStaticPath() const destPath = join(FILES_CACHE.VIDEO_CAPTIONS.DIRECTORY, videoCaption.getCaptionName()) - const path = await this.saveRemoteVideoFileAndReturnPath(video, remoteStaticPath, destPath) + await fetchRemoteVideoStaticFile(video, remoteStaticPath, destPath) - return { isOwned: false, path } + return { isOwned: false, path: destPath } } }