]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/files-cache/videos-preview-cache.ts
Limit user tokens cache
[github/Chocobozzz/PeerTube.git] / server / lib / files-cache / videos-preview-cache.ts
similarity index 88%
rename from server/lib/cache/videos-preview-cache.ts
rename to server/lib/files-cache/videos-preview-cache.ts
index a5d6f5b627be39c8f619cfccc8fb96401787c85c..01cd3647ea271de4fe228eef687e24e5bdfa813d 100644 (file)
@@ -1,5 +1,5 @@
 import { join } from 'path'
-import { CACHE, CONFIG, STATIC_PATHS } from '../../initializers'
+import { FILES_CACHE, CONFIG, STATIC_PATHS } from '../../initializers'
 import { VideoModel } from '../../models/video/video'
 import { AbstractVideoStaticFileCache } from './abstract-video-static-file-cache'
 
@@ -31,7 +31,7 @@ class VideosPreviewCache extends AbstractVideoStaticFileCache <string> {
     if (video.isOwned()) throw new Error('Cannot load remote preview of owned video.')
 
     const remoteStaticPath = join(STATIC_PATHS.PREVIEWS, video.getPreviewName())
-    const destPath = join(CACHE.PREVIEWS.DIRECTORY, video.getPreviewName())
+    const destPath = join(FILES_CACHE.PREVIEWS.DIRECTORY, video.getPreviewName())
 
     return this.saveRemoteVideoFileAndReturnPath(video, remoteStaticPath, destPath)
   }