1
This commit is contained in:
@@ -8,6 +8,9 @@ const fs = require("fs");
|
||||
const path = require("path");
|
||||
const os = require("os");
|
||||
const { spawnSync } = require("child_process");
|
||||
const {
|
||||
buildReplacementsFromMixCutSettings,
|
||||
} = require("./mixcut_replacements.js");
|
||||
|
||||
const IMAGE_EXT = new Set([".jpg", ".jpeg", ".png", ".webp", ".bmp", ".gif"]);
|
||||
|
||||
@@ -434,6 +437,14 @@ function normalizeReplacements(raw) {
|
||||
|
||||
function pickReplacementsFromSettings(settings, videoDuration) {
|
||||
if (!settings || typeof settings !== "object") return [];
|
||||
const fromMixCut = buildReplacementsFromMixCutSettings(
|
||||
settings,
|
||||
videoDuration,
|
||||
probeVideoDuration,
|
||||
);
|
||||
if (fromMixCut.length) {
|
||||
return normalizeReplacements(fromMixCut);
|
||||
}
|
||||
if (Array.isArray(settings.replacements) && settings.replacements.length) {
|
||||
return normalizeReplacements(settings.replacements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user