From 166b72dd4dac4e706b0dc864bca89626be299e86 Mon Sep 17 00:00:00 2001 From: caorushizi <84996057@qq.com> Date: Fri, 28 Feb 2025 02:11:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=20skip=20check=20segment?= =?UTF-8?q?s=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/services/DownloadService.ts | 14 ++++++++------ packages/main/src/services/DownloadService.ts | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/services/DownloadService.ts b/packages/backend/src/services/DownloadService.ts index a33c94bf..c8ac0316 100644 --- a/packages/backend/src/services/DownloadService.ts +++ b/packages/backend/src/services/DownloadService.ts @@ -84,6 +84,8 @@ const processList: Schema[] = [ "--ui-language", "zh-CN", "--live-real-time-merge", + "--check-segments-count", + "false", ], }, }, @@ -136,7 +138,7 @@ export default class DownloadService extends EventEmitter { @inject(TYPES.VideoRepository) private readonly videoRepository: VideoRepository, @inject(TYPES.ConfigService) - private readonly storeService: ConfigService, + private readonly storeService: ConfigService ) { super(); @@ -160,7 +162,7 @@ export default class DownloadService extends EventEmitter { try { await this.videoRepository.changeVideoStatus( task.id, - DownloadStatus.Downloading, + DownloadStatus.Downloading ); this.emit("download-start", task.id); @@ -198,7 +200,7 @@ export default class DownloadService extends EventEmitter { await this.videoRepository.changeVideoStatus( task.id, - DownloadStatus.Success, + DownloadStatus.Success ); this.emit("download-success", task.id); } catch (err: any) { @@ -207,7 +209,7 @@ export default class DownloadService extends EventEmitter { // Download pause await this.videoRepository.changeVideoStatus( task.id, - DownloadStatus.Stopped, + DownloadStatus.Stopped ); this.emit("download-stop", task.id); } else { @@ -215,7 +217,7 @@ export default class DownloadService extends EventEmitter { // Download failure await this.videoRepository.changeVideoStatus( task.id, - DownloadStatus.Failed, + DownloadStatus.Failed ); this.emit("download-failed", task.id, err); } @@ -252,7 +254,7 @@ export default class DownloadService extends EventEmitter { private _execa( binPath: string, args: string[], - params: DownloadOptions, + params: DownloadOptions ): Promise { const { abortSignal, onMessage, id } = params; diff --git a/packages/main/src/services/DownloadService.ts b/packages/main/src/services/DownloadService.ts index c150c9d7..0ea2fdb9 100644 --- a/packages/main/src/services/DownloadService.ts +++ b/packages/main/src/services/DownloadService.ts @@ -91,6 +91,8 @@ const processList: Schema[] = [ "--ui-language", "zh-CN", "--live-real-time-merge", + "--check-segments-count", + "false", ], }, },