Ignore destination sources with found matches on search retry
This commit is contained in:
@@ -801,7 +801,9 @@ export class MigrationManager {
|
||||
});
|
||||
|
||||
try {
|
||||
const searchPromises = MigrationManager.getDestinationSourceIds(entry.sourceId).map((destSourceId) =>
|
||||
const searchPromises = MigrationManager.getDestinationSourceIds(entry.sourceId)
|
||||
.filter((destSourceId) => !entry.destSourceIdToSearchState[destSourceId])
|
||||
.map((destSourceId) =>
|
||||
MigrationManager.getParallelSourceQueue()(async () => {
|
||||
if (signal.aborted) {
|
||||
return null;
|
||||
@@ -880,7 +882,8 @@ export class MigrationManager {
|
||||
draftMatchEntry?.latestChapterNumber ?? Number.MIN_SAFE_INTEGER;
|
||||
|
||||
const hasNewerChapterVsEntry = latestChapterNumber > entryLatestChapterNumber;
|
||||
const hasNewerChapterVsSelectedMatch = latestChapterNumber > selectedMatchLatestChapterNumber;
|
||||
const hasNewerChapterVsSelectedMatch =
|
||||
latestChapterNumber > selectedMatchLatestChapterNumber;
|
||||
const hasNewerChapter = hasNewerChapterVsEntry && hasNewerChapterVsSelectedMatch;
|
||||
|
||||
const hasSameLatestChapterAsSelectedMatch =
|
||||
@@ -901,7 +904,8 @@ export class MigrationManager {
|
||||
!draftMatchEntry);
|
||||
|
||||
const isPreferredMatch =
|
||||
!ignoreOutdatedMatch && (isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
|
||||
!ignoreOutdatedMatch &&
|
||||
(isPreferredSourcePriorityMatch || isPreferredChapterNumberMatch);
|
||||
if (isPreferredMatch) {
|
||||
draftEntry.selectedMatchMangaId = bestMatch.id;
|
||||
draftEntry.selectedMatchSourceId = destSourceId;
|
||||
|
||||
Reference in New Issue
Block a user