mirror of
https://github.com/sussy-code/providers.git
synced 2026-04-21 00:22:07 +00:00
Fixed if condition
This commit is contained in:
parent
bbb39a3aa7
commit
bbd88fd966
1 changed files with 4 additions and 2 deletions
|
|
@ -2,10 +2,12 @@ import { CommonMedia } from '@/entrypoint/utils/media';
|
||||||
|
|
||||||
export function normalizeTitle(title: string): string {
|
export function normalizeTitle(title: string): string {
|
||||||
let titleTrimmed = title.trim().toLowerCase();
|
let titleTrimmed = title.trim().toLowerCase();
|
||||||
if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")) ||
|
if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")))) {
|
||||||
(titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) {
|
|
||||||
titleTrimmed = titleTrimmed.replace("the movie", "");
|
titleTrimmed = titleTrimmed.replace("the movie", "");
|
||||||
}
|
}
|
||||||
|
if (((titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) {
|
||||||
|
titleTrimmed = titleTrimmed.replace("the series", "");
|
||||||
|
}
|
||||||
return titleTrimmed
|
return titleTrimmed
|
||||||
.replace(/['":]/g, "")
|
.replace(/['":]/g, "")
|
||||||
.replace(/[^a-zA-Z0-9]+/g, "_");
|
.replace(/[^a-zA-Z0-9]+/g, "_");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue