Fixing bug where refreshing a video would download a copy, instead of just the metadata.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-03-19 15:02:32 -06:00
parent 1109dd3933
commit ebcb7b0e5d
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 8 additions and 7 deletions

View file

@ -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);
}

View file

@ -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)}`;