yt-dlp downloads

This commit is contained in:
2026-02-20 05:28:26 +00:00
parent 2a7485add2
commit 8a637c7788
3 changed files with 110 additions and 0 deletions
@@ -68,6 +68,9 @@ export const useFiles = (root: string = 'home') => {
gitClone: (url: string, path: string) => client.post(withRoot('/file-browser/git-clone'), { url, path }),
downloadVideo: (url: string, path: string, audioOnly: boolean) =>
client.post(withRoot('/file-browser/download-video'), { url, path, audioOnly }),
download: async (paths: string[]) => {
if (paths.length === 1) {
const blob = await client.getBlob(withRoot(`/file-browser/download?path=${encodeURIComponent(paths[0]!)}`));