Prevent duplicated matches in bulk migration

This commit is contained in:
schroda
2026-05-16 22:03:42 +02:00
parent a15cd20031
commit e673485d8a
2 changed files with 5 additions and 1 deletions

View File

@@ -852,7 +852,10 @@ export class MigrationManager {
? draft.entries[draftEntry.selectedMatchMangaId]
: null;
const matches = foundMatches.map((manga) => ({
const newMatches = foundMatches.filter((newMatch) =>
draftEntry.searchMatches.every((existingMatch) => newMatch.id !== existingMatch.id),
);
const matches = newMatches.map((manga) => ({
id: manga.id,
title: manga.title,
artist: manga.artist,