mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-24 17:06:18 -05:00
Fixing bug where refreshing a video would download a copy, instead of just the metadata.
This commit is contained in:
parent
1109dd3933
commit
ebcb7b0e5d
2 changed files with 8 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue