Prevent overwriting a manual selected migration match

This commit is contained in:
schroda
2026-05-16 22:36:22 +02:00
parent 4095e65f48
commit 531ec46be7
3 changed files with 7 additions and 0 deletions

View File

@@ -273,6 +273,7 @@ export class MigrationManager {
error: entry.error,
isExcluded: entry.isExcluded,
areMatchesExpanded: entry.areMatchesExpanded,
isManualSelection: entry.isManualSelection,
} satisfies TMigrationEntry;
if (isEqual(entry, updatedEntry)) {
@@ -346,6 +347,7 @@ export class MigrationManager {
isExcluded: false,
areMatchesExpanded: false,
error: undefined,
isManualSelection: false,
},
]),
);
@@ -592,6 +594,7 @@ export class MigrationManager {
entry.status = MigrationEntryStatus.SEARCH_COMPLETE;
}
entry.isManualSelection = true;
entry.selectedMatchMangaId = targetMangaId;
entry.selectedMatchSourceId = targetSourceId;
}
@@ -915,6 +918,7 @@ export class MigrationManager {
!draftMatchEntry);
const isPreferredMatch =
!draftEntry.isManualSelection &&
!ignoreOutdatedMatch &&
(isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
if (isPreferredMatch) {