mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 23:48:15 -07:00
Apply auto-build changes
This commit is contained in:
parent
57b4662c3d
commit
808e43e2b5
2 changed files with 27 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.editreadyParser = exports.getFFmpegVar = exports.getFFmpegPercentage = exports.ffmpegParser = exports.handbrakeParser = void 0;
|
||||
exports.editreadyParser = exports.getHandBrakeFps = exports.getFFmpegVar = exports.getFFmpegPercentage = exports.ffmpegParser = exports.handbrakeParser = void 0;
|
||||
var handbrakeParser = function (_a) {
|
||||
var str = _a.str, hbPass = _a.hbPass;
|
||||
if (typeof str !== 'string') {
|
||||
|
|
@ -30,6 +30,24 @@ var handbrakeParser = function (_a) {
|
|||
return percentage;
|
||||
};
|
||||
exports.handbrakeParser = handbrakeParser;
|
||||
var getHandBrakeFps = function (_a) {
|
||||
var str = _a.str;
|
||||
try {
|
||||
if (typeof str !== 'string' || !(str.includes('(') && str.includes('fps'))) {
|
||||
return 0;
|
||||
}
|
||||
var out = parseInt(str.split('(')[1].split('fps')[0].trim(), 10);
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
if (!isNaN(out)) {
|
||||
return out;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
// err
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
exports.getHandBrakeFps = getHandBrakeFps;
|
||||
// frame= 889 fps=106 q=26.0 Lsize= 25526kB time=00:00:35.69 bitrate=5858.3kbits/s speed=4.25x
|
||||
var getFFmpegVar = function (_a) {
|
||||
var str = _a.str, variable = _a.variable;
|
||||
|
|
|
|||
|
|
@ -171,6 +171,14 @@ var CLI = /** @class */ (function () {
|
|||
percentage: percentage,
|
||||
});
|
||||
}
|
||||
var fps = (0, cliParsers_1.getHandBrakeFps)({
|
||||
str: str,
|
||||
});
|
||||
if (fps > 0) {
|
||||
_this.config.updateWorker({
|
||||
fps: fps,
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (_this.config.cli.toLowerCase().includes('ffmpeg')) {
|
||||
var n = str.indexOf('fps');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue