diff --git a/src/videoag/course/DownloadManager.tsx b/src/videoag/course/DownloadManager.tsx index 334b56e82944a4d2ab1724171f1ba867f956dab2..5f9005da2e055e1eb942c0ca935c6f5feb756f6d 100644 --- a/src/videoag/course/DownloadManager.tsx +++ b/src/videoag/course/DownloadManager.tsx @@ -181,7 +181,7 @@ async function downloadWithDownloadAPI( ): Promise<boolean> { showWarningToast( "Unable to store files in directory automatically. Using basic download API which might require" + - " you to selected the destination location for every file.", + " you to select the destination location for every file.", ); for (const toDownload of filesToDownload) { try { @@ -211,7 +211,6 @@ async function downloadWithDownloadAPI( } async function downloadMedia( - downloadStatus: Map<int, DownloadStatus> | undefined, setDownloadStatus: ( fn: (old?: Map<int, DownloadStatus> | undefined) => Map<int, DownloadStatus> | undefined, ) => void, @@ -287,9 +286,6 @@ async function downloadMedia( return false; }); console.log(`Download finished. Success: ${success}`); - if (success) { - showInfoToast("Download finished"); - } } function DownloadAllLectureListItem({ @@ -310,7 +306,7 @@ function DownloadAllLectureListItem({ const media = getSortedDownloadablePublishMedia(lecture.publish_media!); let displayedProgress; - if (isDownloading && selectedMediumId !== undefined) { + if ((isDownloading || downloadStatus !== undefined) && selectedMediumId !== undefined) { // Lecture needs to be downloaded if (downloadStatus === undefined) { // Not yet started @@ -495,7 +491,6 @@ export default function DownloadAllModal({ course }: { course: course }) { const startDownloads = async () => { if (isDownloading) return; downloadMedia( - downloadStatus, setDownloadStatus, course, chosenMediumIdByLectureId, diff --git a/src/videoag/course/Medium.tsx b/src/videoag/course/Medium.tsx index 54b50c72ca1eb37d61ac9470adcd4b71de4d0571..c2a0ae84d31bdcc7e7aa08299904e84fe4f59923 100644 --- a/src/videoag/course/Medium.tsx +++ b/src/videoag/course/Medium.tsx @@ -87,7 +87,7 @@ export function PublishMediumList({ publish_media }: { publish_media: publish_me } > <span className="bi bi-download" /> - <a href={medium.download_url} className="mx-1"> + <a href={medium.download_url} download target="_blank" className="mx-1"> {name} </a> {editMode && ( @@ -147,7 +147,7 @@ export function PublishMediumDownloadButton({ return ( <div key={medium.id} className={"d-flex align-items-center " + bgColor}> - <Dropdown.Item href={medium.download_url} download> + <Dropdown.Item href={medium.download_url} download target="_blank"> {name} </Dropdown.Item> {editMode && (