mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 02:05:54 -07:00
Update Check Video Bitrate
This commit is contained in:
parent
b71bd5ea3e
commit
8b327f3534
2 changed files with 4 additions and 2 deletions
|
|
@ -80,9 +80,10 @@ var plugin = function (args) {
|
||||||
var hasVideoBitrate = false;
|
var hasVideoBitrate = false;
|
||||||
if ((_b = (_a = args.inputFileObj) === null || _a === void 0 ? void 0 : _a.mediaInfo) === null || _b === void 0 ? void 0 : _b.track) {
|
if ((_b = (_a = args.inputFileObj) === null || _a === void 0 ? void 0 : _a.mediaInfo) === null || _b === void 0 ? void 0 : _b.track) {
|
||||||
args.inputFileObj.mediaInfo.track.forEach(function (stream) {
|
args.inputFileObj.mediaInfo.track.forEach(function (stream) {
|
||||||
if (stream['@type'] === 'video') {
|
if (stream['@type'].toLowerCase() === 'video') {
|
||||||
if (stream.BitRate) {
|
if (stream.BitRate) {
|
||||||
hasVideoBitrate = true;
|
hasVideoBitrate = true;
|
||||||
|
args.jobLog("Found video bitrate: ".concat(stream.BitRate));
|
||||||
}
|
}
|
||||||
if (stream.BitRate >= greaterThanBits && stream.BitRate <= lessThanBits) {
|
if (stream.BitRate >= greaterThanBits && stream.BitRate <= lessThanBits) {
|
||||||
isWithinRange = true;
|
isWithinRange = true;
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,10 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
|
||||||
|
|
||||||
if (args.inputFileObj?.mediaInfo?.track) {
|
if (args.inputFileObj?.mediaInfo?.track) {
|
||||||
args.inputFileObj.mediaInfo.track.forEach((stream) => {
|
args.inputFileObj.mediaInfo.track.forEach((stream) => {
|
||||||
if (stream['@type'] === 'video') {
|
if (stream['@type'].toLowerCase() === 'video') {
|
||||||
if (stream.BitRate) {
|
if (stream.BitRate) {
|
||||||
hasVideoBitrate = true;
|
hasVideoBitrate = true;
|
||||||
|
args.jobLog(`Found video bitrate: ${stream.BitRate}`);
|
||||||
}
|
}
|
||||||
if (stream.BitRate >= greaterThanBits && stream.BitRate <= lessThanBits) {
|
if (stream.BitRate >= greaterThanBits && stream.BitRate <= lessThanBits) {
|
||||||
isWithinRange = true;
|
isWithinRange = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue