From 2b5dfa2fe00a433ff59c4ca922600f3d860e0903 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Jun 2023 14:29:34 +0200 Subject: [PATCH] Fix adding element in playlists --- server/controllers/api/video-playlist.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index 304f1ddfb..73362e1e3 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts @@ -497,7 +497,9 @@ async function generateThumbnailForPlaylist (videoPlaylist: MVideoPlaylistThumbn // Ensure the file is on disk const videoMiniaturePermanentFileCache = new VideoMiniaturePermanentFileCache() - const inputPath = await videoMiniaturePermanentFileCache.downloadRemoteFile(videoMiniature) + const inputPath = videoMiniature.isOwned() + ? videoMiniature.getPath() + : await videoMiniaturePermanentFileCache.downloadRemoteFile(videoMiniature) const thumbnailModel = await updateLocalPlaylistMiniatureFromExisting({ inputPath,