mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Made imdb regex ungreedy
This commit is contained in:
parent
f9e9215bcb
commit
d89af16858
2 changed files with 2 additions and 2 deletions
|
|
@ -106,7 +106,7 @@ var getId = function (args, arrApp, fileName) { return __awaiter(void 0, void 0,
|
|||
return __generator(this, function (_k) {
|
||||
switch (_k.label) {
|
||||
case 0:
|
||||
imdbId = (_f = (_e = /\b(tt|nm|co|ev|ch|ni)\d{7,10}\b/i.exec(fileName)) === null || _e === void 0 ? void 0 : _e.at(0)) !== null && _f !== void 0 ? _f : '';
|
||||
imdbId = (_f = (_e = /\b(tt|nm|co|ev|ch|ni)\d{7,10}?\b/i.exec(fileName)) === null || _e === void 0 ? void 0 : _e.at(0)) !== null && _f !== void 0 ? _f : '';
|
||||
if (!(imdbId !== '')) return [3 /*break*/, 2];
|
||||
_b = Number;
|
||||
return [4 /*yield*/, args.deps.axios({
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue