From ebcb7b0e5d606e287153c140dc1d7e3a4988a50a Mon Sep 17 00:00:00 2001 From: Roland Date: Thu, 19 Mar 2026 15:02:32 -0600 Subject: [PATCH] Fixing bug where refreshing a video would download a copy, instead of just the metadata. --- app/src/api.js | 8 ++++++-- app/src/components/VideoPlayer.js | 7 ++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/api.js b/app/src/api.js index bec086eb..5bc725e2 100644 --- a/app/src/api.js +++ b/app/src/api.js @@ -271,8 +271,12 @@ export async function deleteVideos(videoIds) { } } -export async function downloadVideoMetadata(videoUrl, destination) { - const downloadData = {urls: [videoUrl], downloader: Downloaders.Video, destination: destination}; +export async function downloadVideoMetadata(videoUrl) { + const downloadData = { + urls: [videoUrl], + downloader: Downloaders.Video, + settings: {download_metadata_only: true}, + }; return await postDownload(downloadData); } diff --git a/app/src/components/VideoPlayer.js b/app/src/components/VideoPlayer.js index 90765bc1..f3f57775 100644 --- a/app/src/components/VideoPlayer.js +++ b/app/src/components/VideoPlayer.js @@ -7,7 +7,6 @@ import { APIButton, BackButton, encodeMediaPath, - getParentDirectory, humanFileSize, humanNumber, isoDatetimeToAgoPopup, @@ -75,8 +74,7 @@ const NoComments = ({video}) => { const videoUrl = video.url; const handleRefresh = async () => { - const destination = getParentDirectory(video.primary_path); - await downloadVideoMetadata(videoUrl, destination); + await downloadVideoMetadata(videoUrl); }; if (videoUrl) { @@ -273,8 +271,7 @@ function VideoPage({videoFile, prevFile, nextFile, fetchVideo, ...props}) { } const handleRefresh = async () => { - const destination = getParentDirectory(videoFile.primary_path); - await downloadVideoMetadata(videoFile.url, destination); + await downloadVideoMetadata(videoFile.url); }; let videoUrl = `${MEDIA_PATH}/${encodeMediaPath(video.video_path)}`;