mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-12 02:21:06 +08:00
fix downloading
This commit is contained in:
@@ -25,13 +25,11 @@ const isDownloading = ref(props.info?.state === "downloading" ? true : false);
|
||||
|
||||
// 下载状态控制
|
||||
const toggleDownload = async () => {
|
||||
let operation = isDownloading.value ? "pause" : "start";
|
||||
let operation = isDownloading.value ? "stop" : "start";
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.put(`download/${props.info?.hash}`, {
|
||||
params: {
|
||||
open: operation,
|
||||
},
|
||||
});
|
||||
const result: { [key: string]: any } = await api.put(
|
||||
`download/${props.info?.hash}/${operation}`
|
||||
);
|
||||
isDownloading.value = !isDownloading.value;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user