From 2b3a8bf6b661631da8f4d74eae3345e49000c5ba Mon Sep 17 00:00:00 2001 From: Moyasee Date: Tue, 6 Jan 2026 18:11:22 +0200 Subject: [PATCH] refactor: replace type assertions with non-null assertions for download ID in DownloadManager --- src/main/services/download/download-manager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/services/download/download-manager.ts b/src/main/services/download/download-manager.ts index dac9d6ff..497bc326 100644 --- a/src/main/services/download/download-manager.ts +++ b/src/main/services/download/download-manager.ts @@ -452,7 +452,7 @@ export class DownloadManager { case Downloader.Gofile: { const id = download.uri.split("/").pop(); const token = await GofileApi.authorize(); - const downloadLink = await GofileApi.getDownloadLink(id as string); + const downloadLink = await GofileApi.getDownloadLink(id!); await GofileApi.checkDownloadUrl(downloadLink); return { @@ -463,7 +463,7 @@ export class DownloadManager { } case Downloader.PixelDrain: { const id = download.uri.split("/").pop(); - const downloadUrl = await PixelDrainApi.getDownloadUrl(id as string); + const downloadUrl = await PixelDrainApi.getDownloadUrl(id!); return { url: downloadUrl, @@ -578,7 +578,7 @@ export class DownloadManager { case Downloader.Gofile: { const id = download.uri.split("/").pop(); const token = await GofileApi.authorize(); - const downloadLink = await GofileApi.getDownloadLink(id as string); + const downloadLink = await GofileApi.getDownloadLink(id!); await GofileApi.checkDownloadUrl(downloadLink); return { @@ -593,7 +593,7 @@ export class DownloadManager { } case Downloader.PixelDrain: { const id = download.uri.split("/").pop(); - const downloadUrl = await PixelDrainApi.getDownloadUrl(id as string); + const downloadUrl = await PixelDrainApi.getDownloadUrl(id!); return { action: "start",