Only remove SRTs with matching filename

This commit is contained in:
MrMeeb 2024-04-27 21:21:22 +00:00
parent eb2a7b46c4
commit 45da0baf90

@ -153,9 +153,11 @@ const details = () => ({
if (ffmpegSubs.length > 0) {
let subName = removeMKV(otherArguments.originalLibraryFile.meta.FileName)
response.infoLog += '☒ Changes are required! \n Extracting SRT files';
require("child_process").execSync(`rm -rf ${otherArguments.originalLibraryFile.meta.Directory}/*.srt`)
require("child_process").execSync(`rm -rf "${otherArguments.originalLibraryFile.meta.Directory}/${subName}*.srt`)
response.FFmpegMode = true;