mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-20 07:44:42 +01:00
fix: queue now work for normal downloads
This commit is contained in:
@@ -164,6 +164,7 @@ export const DownloadItem: React.FC<DownloadProps> = ({ item, ...props }) => {
|
||||
selectedAudioStream,
|
||||
selectedSubtitleStream,
|
||||
maxBitrate,
|
||||
settings?.downloadMethod,
|
||||
]);
|
||||
|
||||
/**
|
||||
@@ -291,14 +292,17 @@ export const DownloadItem: React.FC<DownloadProps> = ({ item, ...props }) => {
|
||||
throw new Error("No item id");
|
||||
}
|
||||
closeModal();
|
||||
initiateDownload();
|
||||
// Remove for now
|
||||
// queueActions.enqueue(queue, setQueue, {
|
||||
// id: item.Id,
|
||||
// execute: async () => {
|
||||
// },
|
||||
// item,
|
||||
// });
|
||||
if (settings?.downloadMethod === "remux") {
|
||||
queueActions.enqueue(queue, setQueue, {
|
||||
id: item.Id,
|
||||
execute: async () => {
|
||||
await initiateDownload();
|
||||
},
|
||||
item,
|
||||
});
|
||||
} else {
|
||||
initiateDownload();
|
||||
}
|
||||
} else {
|
||||
toast.error("You are not allowed to download files.");
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export const ActiveDownloads: React.FC<Props> = ({ ...props }) => {
|
||||
},
|
||||
onError: (e) => {
|
||||
console.log(e);
|
||||
toast.error("Failed to cancel download");
|
||||
toast.error("Failed to cancel download on the server");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user