mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Merge pull request #542 from HaveAGitGat/parser_update
Use fileMoveOrCopy
This commit is contained in:
commit
66c3519ccd
13 changed files with 673 additions and 41 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
|
||||
import {
|
||||
getContainer, getFileName, getSubStem, moveFileAndValidate,
|
||||
getContainer, getFileName, getSubStem,
|
||||
} from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -113,11 +114,11 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: ouputFilePath,
|
||||
await fileMoveOrCopy({
|
||||
operation: 'move',
|
||||
sourcePath: args.inputFileObj._id,
|
||||
destinationPath: ouputFilePath,
|
||||
args,
|
||||
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
|
||||
import {
|
||||
getContainer, getFileAbosluteDir, getFileName, moveFileAndValidate,
|
||||
getContainer, getFileAbosluteDir, getFileName,
|
||||
} from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -54,9 +55,10 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
};
|
||||
}
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: ouputFilePath,
|
||||
await fileMoveOrCopy({
|
||||
operation: 'move',
|
||||
sourcePath: args.inputFileObj._id,
|
||||
destinationPath: ouputFilePath,
|
||||
args,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
|
||||
import {
|
||||
getContainer, getFileAbosluteDir, getFileName, moveFileAndValidate,
|
||||
getContainer, getFileAbosluteDir, getFileName,
|
||||
} from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -68,9 +69,10 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
};
|
||||
}
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: newPath,
|
||||
await fileMoveOrCopy({
|
||||
operation: 'move',
|
||||
sourcePath: args.inputFileObj._id,
|
||||
destinationPath: newPath,
|
||||
args,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
|
||||
import {
|
||||
getContainer, getFileAbosluteDir, getFileName, moveFileAndValidate,
|
||||
getContainer, getFileAbosluteDir, getFileName,
|
||||
} from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||
import {
|
||||
IpluginDetails,
|
||||
|
|
@ -66,9 +67,10 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: currentPath,
|
||||
outputPath: newPathTmp,
|
||||
await fileMoveOrCopy({
|
||||
operation: 'move',
|
||||
sourcePath: currentPath,
|
||||
destinationPath: newPathTmp,
|
||||
args,
|
||||
});
|
||||
|
||||
|
|
@ -83,9 +85,10 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: newPathTmp,
|
||||
outputPath: newPath,
|
||||
await fileMoveOrCopy({
|
||||
operation: 'move',
|
||||
sourcePath: newPathTmp,
|
||||
destinationPath: newPath,
|
||||
args,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue