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
3a03b7ed46
commit
86c536252a
2 changed files with 2 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ var getFileInfoFromLookup = function (args, arrApp, fileName) { return __awaiter
|
|||
switch (_c.label) {
|
||||
case 0:
|
||||
fInfo = { id: '-1' };
|
||||
imdbId = (_b = (_a = /\b(tt|nm|co|ev|ch|ni)\d{7,10}\b/i.exec(fileName)) === null || _a === void 0 ? void 0 : _a.at(0)) !== null && _b !== void 0 ? _b : '';
|
||||
imdbId = (_b = (_a = /\b(tt|nm|co|ev|ch|ni)\d{7,10}?\b/i.exec(fileName)) === null || _a === void 0 ? void 0 : _a.at(0)) !== null && _b !== void 0 ? _b : '';
|
||||
if (!(imdbId !== '')) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, args.deps.axios({
|
||||
method: 'get',
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ const getFileInfoFromLookup = async (
|
|||
)
|
||||
: Promise<IFileInfo> => {
|
||||
let fInfo: IFileInfo = { id: '-1' };
|
||||
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) ?? '';
|
||||
if (imdbId !== '') {
|
||||
const lookupResponse: ILookupResponse = await args.deps.axios({
|
||||
method: 'get',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue