mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-13 09:20:27 -07:00
Add Tdarr_Plugin_VP92_VP9_Match_Bitrate_One_Pass test
This commit is contained in:
parent
53f225b6cd
commit
5acd312788
2 changed files with 508 additions and 1 deletions
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint max-classes-per-file: ["error", 2] */
|
||||
// tdarrSkipTest
|
||||
const details = () => ({
|
||||
id: 'Tdarr_Plugin_VP92_VP9_Match_Bitrate_One_Pass',
|
||||
Stage: 'Pre-processing',
|
||||
|
|
@ -256,6 +255,7 @@ class Configurator {
|
|||
function loopOverStreamsOfType(file, type, method) {
|
||||
let id = 0;
|
||||
for (let i = 0; i < file.ffProbeData.streams.length; i += 1) {
|
||||
console.log(file.ffProbeData.streams[i].codec_type);
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() === type) {
|
||||
method(file.ffProbeData.streams[i], id);
|
||||
id += 1;
|
||||
|
|
@ -329,6 +329,7 @@ function buildAudioConfiguration(inputs, file, logger) {
|
|||
if ('tags' in stream) {
|
||||
// Remove unwanted languages
|
||||
if ('language' in stream.tags) {
|
||||
console.log(stream.tags.language.toLowerCase());
|
||||
if (languages.indexOf(stream.tags.language.toLowerCase()) === -1) {
|
||||
configuration.AddOutputSetting(`-map -0:a:${id}`);
|
||||
streams_removing += 1;
|
||||
|
|
@ -340,6 +341,7 @@ function buildAudioConfiguration(inputs, file, logger) {
|
|||
}
|
||||
});
|
||||
|
||||
console.log(stream_count, streams_removing);
|
||||
if (stream_count === streams_removing) {
|
||||
logger.AddError(
|
||||
'*** All audio tracks would have been removed, removing all delete entries',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue