feat(desktop): implement media extraction engine, sys integrations, and UI polish

- Implement get_free_space and set_prevent_sleep in Rust backend
- Add robust media extraction UI and format parser in AddDownloadsModal.tsx
- Wire application settings to Zustand store
- Add global user-select: none for native text feel
- Fix window dragging in Sidebar.tsx
- Add GitHub Actions CI workflow for Tauri cross-platform build
This commit is contained in:
NimBold
2026-06-12 19:12:23 +03:30
parent 90b5397a46
commit c3ad5c3c75
6 changed files with 575 additions and 38 deletions
+26 -14
View File
@@ -60,6 +60,8 @@ export interface DownloadItem {
password?: string | null;
headers?: string | null;
destination?: string;
isMedia?: boolean;
mediaFormatSelector?: string;
}
interface DownloadState {
@@ -165,20 +167,30 @@ export const useDownloadStore = create<DownloadState>((set, get) => ({
settings.defaultDownloadPath ||
'~/Downloads';
await invoke('start_download', {
id: item.id,
url: item.url,
destination: destPath,
filename: item.fileName,
connections: item.connections || settings.perServerConnections || null,
speedLimit: item.speedLimit || settings.globalSpeedLimit || null,
username: item.username || (login ? login.username : null),
password: item.password || (login ? login.password : null),
headers: item.headers || null,
userAgent: settings.customUserAgent || null,
maxTries: settings.maxAutomaticRetries,
proxy: getProxyArgs(settings)
});
if (item.isMedia) {
await invoke('start_media_download', {
id: item.id,
url: item.url,
destination: destPath,
filename: item.fileName,
formatSelector: item.mediaFormatSelector || null
});
} else {
await invoke('start_download', {
id: item.id,
url: item.url,
destination: destPath,
filename: item.fileName,
connections: item.connections || settings.perServerConnections || null,
speedLimit: item.speedLimit || settings.globalSpeedLimit || null,
username: item.username || (login ? login.username : null),
password: item.password || (login ? login.password : null),
headers: item.headers || null,
userAgent: settings.customUserAgent || null,
maxTries: settings.maxAutomaticRetries,
proxy: getProxyArgs(settings)
});
}
} catch (e) {
console.error("Failed to start queued download:", e);
updateDownload(item.id, { status: 'failed' });