aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Media/Anime/Airing/Subtitled/match.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/Media/Anime/Airing/Subtitled/match.ts b/src/lib/Media/Anime/Airing/Subtitled/match.ts
index 52cf581f..eb9c9b70 100644
--- a/src/lib/Media/Anime/Airing/Subtitled/match.ts
+++ b/src/lib/Media/Anime/Airing/Subtitled/match.ts
@@ -220,6 +220,17 @@ export const findClosestMatch = (scheduleIndex: ScheduleIndex, anime: Media): Ti
if (searchTitle.includes('OVA') || searchTitle.includes('Special')) continue;
const normalizedSearchTitle = preprocessTitle(searchTitle);
+ const exactMatchIndexes = dayIndex.exactTitleIndex.get(normalizedSearchTitle);
+
+ if (exactMatchIndexes && exactMatchIndexes.length > 0) {
+ const exactMatch = dayIndex.entries[exactMatchIndexes[0]];
+
+ if (exactMatch) {
+ closestMatchCache.set(cacheKey, exactMatch.time);
+ return exactMatch.time;
+ }
+ }
+
const searchTokens = normalizedSearchTitle.split(' ').filter(isMeaningfulToken);
const candidateIndexSet = new Set<number>();