fix: 重复 URL 添加时显示跳过提示而非误报入队成功

This commit is contained in:
tigerenwork 2026-08-15 15:24:08 +08:00
parent 326c66f0e2
commit 3fafb98651
1 changed files with 5 additions and 0 deletions

View File

@ -456,6 +456,11 @@ export class AppComponent implements OnInit, OnDestroy {
this.addInProgress = false;
if (status.status === 'error') {
this.toastService.show(`添加失败: ${status.msg}`, { error: true });
} else if (status.msg) {
// Backend skipped the URL (e.g. "Download already exists") — surface
// that instead of a misleading "added to queue".
this.toastService.show(status.msg, { error: true });
this.loadEvents();
} else {
this.addUrl = '';
this.toastService.show('已加入队列');