diff --git a/src/components/reader/ReaderPage.tsx b/src/components/reader/ReaderPage.tsx index 8fb5cb13..901f8abe 100644 --- a/src/components/reader/ReaderPage.tsx +++ b/src/components/reader/ReaderPage.tsx @@ -296,7 +296,8 @@ const ReaderPage: React.FC = (props: Props) => { DownloadUnreadChapters( seriesArr, customDownloadsDir || String(getDefaultDownloadDir()), - OnStartUpDownloadUnreadCount + OnStartUpDownloadUnreadCount, + false ); } return true; diff --git a/src/features/library/chapterDownloadUtils.tsx b/src/features/library/chapterDownloadUtils.tsx index 9a64c6b2..18a0d6c8 100644 --- a/src/features/library/chapterDownloadUtils.tsx +++ b/src/features/library/chapterDownloadUtils.tsx @@ -102,7 +102,8 @@ export async function downloadAll( export async function DownloadUnreadChapters( seriesList: Series[], downloadsDir: string, - count = 1 + count = 1, + notification: boolean = true ) { seriesList .filter((series) => library.validURL(series.sourceId)) @@ -133,7 +134,7 @@ export async function DownloadUnreadChapters( } as DownloadTask) ) ); - downloaderClient.start(); + downloaderClient.start(notification); await new Promise((resolve) => setTimeout(resolve, 1000)); }); } diff --git a/src/services/downloader.ts b/src/services/downloader.ts index 235391ac..84f8da0c 100644 --- a/src/services/downloader.ts +++ b/src/services/downloader.ts @@ -99,7 +99,7 @@ class DownloaderClient { this.setDownloadErrors([...this.downloadErrors, downloadError]); }; - start = async () => { + start = async (notification: boolean = true) => { if (this.running) return; if (this.queue.length === 0) { @@ -109,7 +109,9 @@ class DownloaderClient { const startingQueueSize = this.queue.length; const notificationId = uuidv4(); - showNotification({ id: notificationId, message: 'Starting download...', loading: true }); + if (notification) { + showNotification({ id: notificationId, message: 'Starting download...', loading: true }); + } this.setRunning(true); let tasksCompleted = 0;