Compare commits
No commits in common. "70002b2ba72bd33988985c103f6579e2e20df83a" and "ca4e4dcf5b0caf720beb1684bc6a36c29e578b12" have entirely different histories.
70002b2ba7
...
ca4e4dcf5b
@ -6,7 +6,6 @@ import { help } from "./commands/help.js";
|
||||
import { preferAudio } from "./commands/prefer-audio.js";
|
||||
import { preferSubtitles } from "./commands/prefer-subs.js";
|
||||
import { removeSubtitles } from "./commands/remove-subs.js";
|
||||
import { forceRename } from "./commands/rename.js";
|
||||
import { saveSubtitlesToFile } from "./commands/save-subtitles-to-file.js";
|
||||
import { convertToMkv } from "./commands/to-mkv.js";
|
||||
import { convertToMp4 } from "./commands/to-mp4.js";
|
||||
@ -26,16 +25,10 @@ export const CommandConfig = [
|
||||
},
|
||||
{
|
||||
name: 'Finalize File Names',
|
||||
commands: ['-o', '-output-as', '-rename-series'],
|
||||
commands: ['-o', '-output-as', '-rename'],
|
||||
params: ['ShowName'],
|
||||
func: finalizeFileNames,
|
||||
},
|
||||
{
|
||||
name: 'Force Rename',
|
||||
commands: ['-rn', '-rename', '-force-rename'],
|
||||
params: ['Name'],
|
||||
func:forceRename,
|
||||
},
|
||||
{
|
||||
name: 'Add Subtitle Track',
|
||||
commands: ['-s', '-subtitle', '-add-subtitles'],
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import fs from 'fs';
|
||||
import { getFilenameObject } from '../parsing/parse-filename.js';
|
||||
|
||||
export async function forceRename(inputDir, inputFile, outputDir, { Name }) {
|
||||
const filenameObject = getFilenameObject(inputFile);
|
||||
|
||||
const toWrite = `${outputDir}${Name}${filenameObject.extension}`;
|
||||
|
||||
fs.cpSync(`${inputDir}${inputFile}`, `${toWrite}`);
|
||||
}
|
||||
@ -49,8 +49,6 @@ export function CreatePipeline(inputParams) {
|
||||
}
|
||||
|
||||
// Copy /temp/Step-L/* -> /output
|
||||
console.log(`Copying to ${Folders.OUTPUT} ...`);
|
||||
|
||||
if(fs.existsSync(Folders.OUTPUT)) {
|
||||
fs.rmSync(Folders.OUTPUT, { recursive: true, force: true });
|
||||
}
|
||||
@ -58,7 +56,6 @@ export function CreatePipeline(inputParams) {
|
||||
fs.cpSync(getTempFolderName(this.commands.length), Folders.OUTPUT, { recursive: true });
|
||||
|
||||
// remove /temp/*
|
||||
console.log('Cleaning up temporary files');
|
||||
fs.rmSync(Folders.TEMP, { recursive: true, force: true });
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user