diff --git a/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js index cc6ce1e..9c32bd0 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js @@ -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', diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts index c9468e0..97b939c 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts @@ -126,7 +126,7 @@ const getFileInfoFromLookup = async ( ) : Promise => { 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',