Update download method
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 18s

This commit is contained in:
0d0 2025-04-19 17:58:24 +02:00
parent 08578eef0b
commit 5bcbfc70ec
5 changed files with 31 additions and 28 deletions

View file

@ -14,7 +14,7 @@
let disabled = $state(true);
let metadata = $state(false);
let logs = $state('');
let downloadManager: DownloadManager|null = null;
let downloadManager: DownloadManager | null = null;
const formats = Object.keys(supportedFormats).map((f) => {
return { value: f, label: f.toUpperCase() };
@ -29,13 +29,13 @@
};
const dismiss = () => {
unmount(downloadManager)
}
unmount(downloadManager);
};
const onClick = async (evt) => {
evt.preventDefault();
const props = $state( { url: href });
const props = $state({ url: href });
downloadManager = mount(DownloadManager, { target: document.body, props, events: { dismiss } });
link = '';

View file

@ -54,7 +54,6 @@ export const GET: RequestHandler = async ({ url }) => {
logger.error('Error fetching metadata:');
throw error(500, 'Failed to fetch video metadata');
}
try {
// Stream video/audio