Made imdb regex ungreedy

This commit is contained in:
jeanchristophe.mqt@gmail.com 2024-04-12 10:17:05 +02:00
parent f9e9215bcb
commit d89af16858
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ const getId = async (
fileName: string,
)
: Promise<number> => {
const imdbId = /\b(tt|nm|co|ev|ch|ni)\d{7,10}\b/i.exec(fileName)?.at(0) ?? '';
const imdbId = /\b(tt|nm|co|ev|ch|ni)\d{7,10}?\b/i.exec(fileName)?.at(0) ?? '';
let id = (imdbId !== '')
? Number((await args.deps.axios({
method: 'get',