Keep whitespace when sanitizing string

This commit is contained in:
2022-01-03 18:04:10 +01:00
parent 14775744b0
commit 8165cf8e85

View File

@@ -8,7 +8,7 @@ const { Movie, Show, Person } = require("src/tmdb/types");
const RedisCache = require("src/cache/redis");
const redisCache = new RedisCache();
const sanitize = string => string.toLowerCase().replace(/[^\w\s]/gi, "");
const sanitize = string => string.toLowerCase().replace(/[^\w]/gi, "");
const matchingTitleAndYear = (plex, tmdb) => {
let matchingTitle, matchingYear;