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