From bbd88fd966a7867cc960c5ade6d71a53210baef8 Mon Sep 17 00:00:00 2001 From: capak07 <69026837+capak07@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:20:19 -0400 Subject: [PATCH] Fixed if condition --- src/utils/compare.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/compare.ts b/src/utils/compare.ts index db75338..370735f 100644 --- a/src/utils/compare.ts +++ b/src/utils/compare.ts @@ -2,10 +2,12 @@ import { CommonMedia } from '@/entrypoint/utils/media'; export function normalizeTitle(title: string): string { let titleTrimmed = title.trim().toLowerCase(); - if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")) || - (titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) { + if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")))) { titleTrimmed = titleTrimmed.replace("the movie", ""); } + if (((titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) { + titleTrimmed = titleTrimmed.replace("the series", ""); + } return titleTrimmed .replace(/['":]/g, "") .replace(/[^a-zA-Z0-9]+/g, "_");