From 4476b1b216ba2425ccd4c4f8eb28a3cbae37302a Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Mon, 23 Dec 2024 01:32:45 +0000 Subject: [PATCH] feat: removing publishers --- src/renderer/src/app.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index fab239c2..95edba5d 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -26,6 +26,7 @@ import { import { useTranslation } from "react-i18next"; import { UserFriendModal } from "./pages/shared-modals/user-friend-modal"; import { downloadSourcesWorker } from "./workers"; +import { downloadSourcesTable } from "./dexie"; export interface AppProps { children: React.ReactNode; @@ -205,6 +206,18 @@ export function App() { const newRepacksCount = event.data; window.electron.publishNewRepacksNotification(newRepacksCount); updateRepacks(); + + downloadSourcesTable.toArray().then((downloadSources) => { + downloadSources + .filter((source) => !source.fingerprint) + .forEach((downloadSource) => { + window.electron + .putDownloadSource(downloadSource.objectIds) + .then(({ fingerprint }) => { + downloadSourcesTable.update(downloadSource.id, { fingerprint }); + }); + }); + }); }; downloadSourcesWorker.postMessage(["SYNC_DOWNLOAD_SOURCES", id]);