1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Support lazy download thumbnails

This commit is contained in:
Chocobozzz 2023-06-06 15:59:51 +02:00
parent a673d9e848
commit f162d32da0
No known key found for this signature in database
GPG key ID: 583A612D890159BE
27 changed files with 272 additions and 212 deletions

View file

@ -1,7 +1,7 @@
import cors from 'cors'
import express from 'express'
import { logger } from '@server/helpers/logger'
import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
import { VideoTorrentsSimpleFileCache } from '@server/lib/files-cache'
import { generateHLSFilePresignedUrl, generateWebVideoPresignedUrl } from '@server/lib/object-storage'
import { Hooks } from '@server/lib/plugins/hooks'
import { VideoPathManager } from '@server/lib/video-path-manager'
@ -43,7 +43,7 @@ export {
// ---------------------------------------------------------------------------
async function downloadTorrent (req: express.Request, res: express.Response) {
const result = await VideosTorrentCache.Instance.getFilePath(req.params.filename)
const result = await VideoTorrentsSimpleFileCache.Instance.getFilePath(req.params.filename)
if (!result) {
return res.fail({
status: HttpStatusCode.NOT_FOUND_404,