Compare commits
4 Commits
9c60d80bbd
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fa79a752b | |||
| 4c24372e48 | |||
| e7c224f335 | |||
| c6292e14dd |
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user