Skip to content

Commit

Permalink
fix: 🐛 skip check segments count
Browse files Browse the repository at this point in the history
  • Loading branch information
caorushizi committed Feb 27, 2025
1 parent 5fc98ea commit 166b72d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/backend/src/services/DownloadService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const processList: Schema[] = [
"--ui-language",
"zh-CN",
"--live-real-time-merge",
"--check-segments-count",
"false",
],
},
},
Expand Down Expand Up @@ -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();

Expand All @@ -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);

Expand Down Expand Up @@ -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) {
Expand All @@ -207,15 +209,15 @@ 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 {
this.logger.error(`taskId: ${task.id} failed`, err);
// Download failure
await this.videoRepository.changeVideoStatus(
task.id,
DownloadStatus.Failed,
DownloadStatus.Failed
);
this.emit("download-failed", task.id, err);
}
Expand Down Expand Up @@ -252,7 +254,7 @@ export default class DownloadService extends EventEmitter {
private _execa(
binPath: string,
args: string[],
params: DownloadOptions,
params: DownloadOptions
): Promise<void> {
const { abortSignal, onMessage, id } = params;

Expand Down
2 changes: 2 additions & 0 deletions packages/main/src/services/DownloadService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const processList: Schema[] = [
"--ui-language",
"zh-CN",
"--live-real-time-merge",
"--check-segments-count",
"false",
],
},
},
Expand Down

0 comments on commit 166b72d

Please sign in to comment.