mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Move imports into plugin function
This commit is contained in:
parent
3042b35800
commit
f037743bea
87 changed files with 182 additions and 108 deletions
|
|
@ -1,5 +1,3 @@
|
|||
const lib = require('../methods/lib')();
|
||||
|
||||
const details = () => ({
|
||||
id: 'Tdarr_Plugin_a9he_New_file_size_check',
|
||||
Stage: 'Pre-processing',
|
||||
|
|
@ -13,6 +11,8 @@ const details = () => ({
|
|||
});
|
||||
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
// Must return this object at some point in the function else plugin will fail.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
const lib = require('../methods/lib')();
|
||||
|
||||
const details = () => ({
|
||||
id: 'Tdarr_Plugin_f001_Filter_Example',
|
||||
Stage: 'Pre-processing',
|
||||
|
|
@ -14,6 +12,8 @@ const details = () => ({
|
|||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
// Must return this object at some point in the function else plugin will fail.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
const lib = require('../methods/lib')();
|
||||
|
||||
const details = () => ({
|
||||
id: 'Tdarr_Plugin_f002_Filter_Example',
|
||||
Stage: 'Pre-processing',
|
||||
|
|
@ -14,6 +12,8 @@ const details = () => ({
|
|||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
const response = {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
/* eslint import/no-extraneous-dependencies: 0 */ // --> OFF
|
||||
/* eslint no-console: 0 */ // --> OFF
|
||||
|
||||
const lib = require('../methods/lib')();
|
||||
|
||||
// List any npm dependencies which the plugin needs, they will be auto installed when the plugin runs:
|
||||
module.exports.dependencies = [
|
||||
'import-fresh',
|
||||
|
|
@ -59,6 +57,8 @@ const details = () => ({
|
|||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
/* eslint import/no-extraneous-dependencies: 0 */ // --> OFF
|
||||
/* eslint no-console: 0 */ // --> OFF
|
||||
|
||||
const lib = require('../methods/lib')();
|
||||
// List any npm dependencies which the plugin needs, they will be auto installed when the plugin runs:
|
||||
module.exports.dependencies = [
|
||||
'import-fresh',
|
||||
|
|
@ -71,6 +70,8 @@ const details = () => ({
|
|||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
// Only 'require' dependencies within this function or other functions. Do not require in the top scope.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue