fix: 重复 URL 添加时显示跳过提示而非误报入队成功
This commit is contained in:
parent
326c66f0e2
commit
3fafb98651
|
|
@ -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('已加入队列');
|
||||
|
|
|
|||
Loading…
Reference in New Issue