Compare commits

...

4 Commits

2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ const details = () => ({
Name: 'MrMeeb Extract Subtitles',
Type: 'Subtitle',
Operation: 'Transcode',
Description: 'Automatically extracts SRT subtitles to external files and removes the embedded ones.',
Description: 'Automatically extracts SRT subtitles to external files and removes the embedded ones. Created to fix a bug where Infuse cannot auto-select embedded forced subtitles',
Version: '0.1',
Tags: 'pre-processing',
Inputs: [],
@ -56,6 +56,7 @@ const details = () => ({
let subIdx = -1; // The stream index of the current subtitle stream, relative to all subtitle steams
console.log(` === Running Extract Subs function === `)
response.jobLog += `Hello!`
// Identify all subtitles
for (let i = 0; i < file.ffProbeData.streams.length; i ++) {
@ -157,7 +158,7 @@ const details = () => ({
response.infoLog += '☒ Changes are required! \n Extracting SRT files';
require("child_process").execSync(`rm -rf "${otherArguments.originalLibraryFile.meta.Directory}/${subName}*.srt`)
require("child_process").execSync(`rm -rf "${otherArguments.originalLibraryFile.meta.Directory}/${subName}"*.srt`)
response.FFmpegMode = true;

View File

@ -291,7 +291,7 @@ const response = {
}
// Identify if stream is DTS-HD MA
if (file.ffProbeData.streams[i].profile.toLowerCase() === 'dts-hd ma') {
if (file.ffProbeData.streams[i].profile != undefined && file.ffProbeData.streams[i].profile.toLowerCase() === 'dts-hd ma') {
// Check if DTS-HD MA has already been handled by a previous run
// Assume that it will be the second stream (first audio stream) - it should be, if already handled