Rollback temporary native-scan PoC hold
This commit is contained in:
parent
9ceb238bc5
commit
a8f303c941
1 changed files with 3 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
* @name Radarr - Trigger Manual Import
|
* @name Radarr - Trigger Manual Import
|
||||||
* @description Safely trigger Radarr ManualImport for exactly one processed file.
|
* @description Safely trigger Radarr ManualImport for exactly one processed file.
|
||||||
* @author FileFlows + Sascha
|
* @author FileFlows + Sascha
|
||||||
* @revision 12
|
* @revision 11
|
||||||
* @output Import erfolgreich
|
* @output Import erfolgreich
|
||||||
* @output Fehler
|
* @output Fehler
|
||||||
* @param {string} URL Radarr root URL and port
|
* @param {string} URL Radarr root URL and port
|
||||||
|
|
@ -11,12 +11,11 @@
|
||||||
* @param {bool} UseUnmappedPath Whether to Unmap the path
|
* @param {bool} UseUnmappedPath Whether to Unmap the path
|
||||||
* @param {bool} MoveMode Import mode: true=move, false=copy
|
* @param {bool} MoveMode Import mode: true=move, false=copy
|
||||||
* @param {int} TimeOut Timeout in seconds (max 3600)
|
* @param {int} TimeOut Timeout in seconds (max 3600)
|
||||||
* @param {string} PocHoldRelease Exact release title to leave for an external native-scan proof
|
|
||||||
*/
|
*/
|
||||||
import { Radarr } from 'Shared/Radarr';
|
import { Radarr } from 'Shared/Radarr';
|
||||||
|
|
||||||
|
|
||||||
function Script(URL, ApiKey, ImportPath, UseUnmappedPath, MoveMode, TimeOut, PocHoldRelease) {
|
function Script(URL, ApiKey, ImportPath, UseUnmappedPath, MoveMode, TimeOut) {
|
||||||
URL = (URL || Variables['Radarr.Url'] || Variables['Radarr.URI']).replace(/\/+$/g, '');
|
URL = (URL || Variables['Radarr.Url'] || Variables['Radarr.URI']).replace(/\/+$/g, '');
|
||||||
ApiKey = ApiKey || Variables['Radarr.ApiKey'];
|
ApiKey = ApiKey || Variables['Radarr.ApiKey'];
|
||||||
const currentFile = Variables['file.FullName'] || Variables.file?.FullName || '';
|
const currentFile = Variables['file.FullName'] || Variables.file?.FullName || '';
|
||||||
|
|
@ -54,11 +53,7 @@ function Script(URL, ApiKey, ImportPath, UseUnmappedPath, MoveMode, TimeOut, Poc
|
||||||
const searchPatterns = [folderPattern, filePattern]
|
const searchPatterns = [folderPattern, filePattern]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.filter((value, index, values) => values.indexOf(value) === index);
|
.filter((value, index, values) => values.indexOf(value) === index);
|
||||||
const pocHold = normalizeReleaseTitle(PocHoldRelease || '');
|
|
||||||
if (pocHold && searchPatterns.some(pattern => normalizeReleaseTitle(pattern) === pocHold)) {
|
|
||||||
Logger.ILog(`PoC hold: leaving '${exactImportPath}' on NVMe for external native Arr scan.`);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
let movieId = Variables['Radarr.movieId'] ?? null;
|
let movieId = Variables['Radarr.movieId'] ?? null;
|
||||||
for (const pattern of searchPatterns) {
|
for (const pattern of searchPatterns) {
|
||||||
if (!movieId) {
|
if (!movieId) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue