Update lib (#227)

* Update library.js

* update imports

* update defaults
This commit is contained in:
HaveAGitGat 2021-12-28 21:37:51 +00:00 committed by GitHub
parent 680916a6db
commit 2ba3df1977
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 601 additions and 612 deletions

View file

@ -1,5 +1,4 @@
// eslint-disable-next-line import/no-unresolved
const loadDefaultValues = require('../methods/loadDefaultValues');
const lib = require('../methods/library');
const details = () => ({
id: 'Tdarr_Plugin_a9he_New_file_size_check',
@ -15,7 +14,7 @@ const details = () => ({
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
inputs = lib.loadDefaultValues(inputs, details);
// Must return this object at some point in the function else plugin will fail.
const response = {
processFile: false,

View file

@ -1,5 +1,4 @@
// eslint-disable-next-line import/no-unresolved
const loadDefaultValues = require('../methods/loadDefaultValues');
const lib = require('../methods/library');
const details = () => ({
id: 'Tdarr_Plugin_f001_Filter_Example',
@ -16,7 +15,7 @@ const details = () => ({
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
inputs = lib.loadDefaultValues(inputs, details);
// Must return this object at some point in the function else plugin will fail.
const response = {

View file

@ -1,5 +1,4 @@
// eslint-disable-next-line import/no-unresolved
const loadDefaultValues = require('../methods/loadDefaultValues');
const lib = require('../methods/library');
const details = () => ({
id: 'Tdarr_Plugin_f002_Filter_Example',
@ -16,7 +15,7 @@ const details = () => ({
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
inputs = lib.loadDefaultValues(inputs, details);
const response = {
processFile: true,
infoLog: '',

View file

@ -5,8 +5,7 @@
/* eslint import/no-extraneous-dependencies: 0 */ // --> OFF
/* eslint no-console: 0 */ // --> OFF
// eslint-disable-next-line import/no-unresolved
const loadDefaultValues = require('../methods/loadDefaultValues');
const lib = require('../methods/library');
// List any npm dependencies which the plugin needs, they will be auto installed when the plugin runs:
module.exports.dependencies = [
@ -61,7 +60,7 @@ const details = () => ({
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
inputs = lib.loadDefaultValues(inputs, details);
// Only 'require' dependencies within this function or other functions. Do not require in the top scope.
const importFresh = require('import-fresh');

View file

@ -5,7 +5,7 @@
/* eslint import/no-extraneous-dependencies: 0 */ // --> OFF
/* eslint no-console: 0 */ // --> OFF
const loadDefaultValues = require('../methods/loadDefaultValues');
const lib = require('../methods/library');
// List any npm dependencies which the plugin needs, they will be auto installed when the plugin runs:
module.exports.dependencies = [
'import-fresh',
@ -72,7 +72,7 @@ const details = () => ({
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
// eslint-disable-next-line no-unused-vars,no-param-reassign
inputs = loadDefaultValues(inputs, details);
inputs = lib.loadDefaultValues(inputs, details);
// Only 'require' dependencies within this function or other functions. Do not require in the top scope.
const importFresh = require('import-fresh');