mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-09 02:40:21 +00:00
feat(queue): implement concurrent deduplication and safe backend detachment
- Add backendRegisteredIds and backendDispatchPromises for single dispatch enforcement - Add detach_download_for_reconfigure to safely modify properties of active downloads - Add applyProperties logic handling completed, failed, paused, and active queues - Add extractValidDownloadUrls and fix multi-url paste handling - Setup vitest and add useDownloadStore unit tests for backend registration lifecycle
This commit is contained in:
+5
-3
@@ -5,8 +5,8 @@ import { DownloadTable } from "./components/DownloadTable";
|
||||
import { AddDownloadsModal } from "./components/AddDownloadsModal";
|
||||
import SettingsView from "./components/SettingsView";
|
||||
import { PropertiesModal } from "./components/PropertiesModal";
|
||||
import { QualityModal } from './components/QualityModal';
|
||||
import { DeleteConfirmationModal } from "./components/DeleteConfirmationModal";
|
||||
import { extractValidDownloadUrls } from './utils/url';
|
||||
import { listenEvent as listen, invokeCommand as invoke } from "./ipc";
|
||||
import { useDownloadStore, MAIN_QUEUE_ID } from './store/useDownloadStore';
|
||||
import { initDownloadListener } from './store/downloadStore';
|
||||
@@ -165,7 +165,10 @@ function App() {
|
||||
}
|
||||
const text = e.clipboardData?.getData('text/plain');
|
||||
if (text && text.trim().length > 0) {
|
||||
useDownloadStore.getState().openAddModalWithUrls(text.trim());
|
||||
const urls = extractValidDownloadUrls(text);
|
||||
if (urls.length > 0) {
|
||||
useDownloadStore.getState().openAddModalWithUrls(urls.join('\n'));
|
||||
}
|
||||
}
|
||||
};
|
||||
window.addEventListener('paste', handlePaste);
|
||||
@@ -310,7 +313,6 @@ function App() {
|
||||
|
||||
<AddDownloadsModal />
|
||||
<PropertiesModal />
|
||||
<QualityModal />
|
||||
<DeleteConfirmationModal />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user