mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Working on updating the tests and cleaning up any formatting issues
This commit is contained in:
parent
888dd94724
commit
b525d14a99
2 changed files with 60 additions and 50 deletions
|
|
@ -86,7 +86,6 @@ Audio: (Only one audio stream is used!!)
|
||||||
/// ///////////////////////////////////////////////////////////////////////////////////////////////////
|
/// ///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
const details = () => ({
|
const details = () => ({
|
||||||
id: 'Tdarr_Plugin_JB69_JBHEVCQSV_MinimalFile',
|
id: 'Tdarr_Plugin_JB69_JBHEVCQSV_MinimalFile',
|
||||||
Stage: 'Pre-processing',
|
Stage: 'Pre-processing',
|
||||||
|
|
@ -326,17 +325,17 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
} else {
|
} else {
|
||||||
const statsThres = Date.parse(new Date(new Date().setDate(new Date().getDate() - intStatsDays)).toISOString());
|
const statsThres = Date.parse(new Date(new Date().setDate(new Date().getDate() - intStatsDays)).toISOString());
|
||||||
|
|
||||||
if (inputs.test === true) {
|
if (inputs.test === true) {
|
||||||
response.infoLog += 'StatsThres: 1696281941214, StatsDate: 1528998569000\n';
|
response.infoLog += 'StatsThres: 1696281941214, StatsDate: 1528998569000\n';
|
||||||
} else {
|
} else {
|
||||||
response.infoLog += `StatsThres: ${statsThres}, StatsDate: ${datStats}\n`;
|
response.infoLog += `StatsThres: ${statsThres}, StatsDate: ${datStats}\n`;
|
||||||
}
|
}
|
||||||
if (datStats >= statsThres) {
|
if (datStats >= statsThres) {
|
||||||
bolStatsAreCurrent = true;
|
bolStatsAreCurrent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//No longer needed if updating stats in Tdarr
|
// No longer needed if updating stats in Tdarr
|
||||||
//if (!bolStatsAreCurrent) {
|
// if (!bolStatsAreCurrent) {
|
||||||
// response.infoLog += 'Stats need to be updated! \n';
|
// response.infoLog += 'Stats need to be updated! \n';
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
|
|
@ -345,7 +344,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
// } catch (err) {
|
// } catch (err) {
|
||||||
// response.infoLog += 'Error Updating Status Probably Bad file, A remux will probably fix, will continue\n';
|
// response.infoLog += 'Error Updating Status Probably Bad file, A remux will probably fix, will continue\n';
|
||||||
// }
|
// }
|
||||||
//}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logic Controls
|
// Logic Controls
|
||||||
|
|
@ -793,7 +792,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputs.test === true) {
|
if (inputs.test === true) {
|
||||||
strFFcmd += ` -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=2023-10-12T00:00:49.483Z `;
|
strFFcmd += ' -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=2023-10-12T00:00:49.483Z ';
|
||||||
} else {
|
} else {
|
||||||
strFFcmd += ` -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=${new Date().toISOString()} `;
|
strFFcmd += ` -map_metadata:g -1 -metadata JBDONEVERSION=1 -metadata JBDONEDATE=${new Date().toISOString()} `;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,9 @@ const tests = [
|
||||||
input: {
|
input: {
|
||||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
|
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
|
||||||
librarySettings: {},
|
librarySettings: {},
|
||||||
inputs: {test:true},
|
inputs: {
|
||||||
|
test: true,
|
||||||
|
},
|
||||||
otherArguments: {},
|
otherArguments: {},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
|
@ -17,19 +19,23 @@ const tests = [
|
||||||
handBrakeMode: false,
|
handBrakeMode: false,
|
||||||
FFmpegMode: true,
|
FFmpegMode: true,
|
||||||
reQueueAfter: true,
|
reQueueAfter: true,
|
||||||
infoLog: 'Index 0 MediaInfo stream: 1 \nVideo stream 0:0:h264:1280x720x25:1205959bps \n' +
|
infoLog: 'Index 0 MediaInfo stream: 1 \nVideo stream 0:0:h264:1280x720x25:1205959bps \n'
|
||||||
'Audio stream 1:???:aac:6:384000bps:First Audio Stream \n' +
|
+ 'Audio stream 1:???:aac:6:384000bps:First Audio Stream \n'
|
||||||
'Pre Video Calc: 720, 1280, 25, 1843200 \nVideo existing Codex is h264, need to convert to hevc(10) \n' +
|
+ 'Pre Video Calc: 720, 1280, 25, 1843200 \nVideo existing Codex is h264, need to convert to hevc(10) \n'
|
||||||
'Low source bitrate! \n' +
|
+ 'Low source bitrate! \n'
|
||||||
'Video existing Bitrate, 1205959, is close to, or lower than, target Bitrate, 1843200, with a codec change, using 80% of existing \n' +
|
+ 'Video existing Bitrate, 1205959, is close to, or lower than, target Bitrate, 1843200, with a codec change, using 80% of existing \n'
|
||||||
'Post Video Calc: 720, 1280, 25, 964767 \n' +
|
+ 'Post Video Calc: 720, 1280, 25, 964767 \n'
|
||||||
'Using Unknown Audio Track !! \n' +
|
+ 'Using Unknown Audio Track !! \n'
|
||||||
'File needs work. Transcoding. \n',
|
+ 'File needs work. Transcoding. \n',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
input: {
|
input: {
|
||||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||||
librarySettings: {},
|
librarySettings: {},
|
||||||
inputs: {test:true},
|
inputs: {
|
||||||
|
test: true,
|
||||||
|
},
|
||||||
otherArguments: {},
|
otherArguments: {},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
|
@ -39,25 +45,29 @@ const tests = [
|
||||||
handBrakeMode: false,
|
handBrakeMode: false,
|
||||||
FFmpegMode: true,
|
FFmpegMode: true,
|
||||||
reQueueAfter: true,
|
reQueueAfter: true,
|
||||||
infoLog: 'StatsThres: 1696281941214, StatsDate: 1528998569000\n' +
|
infoLog: 'StatsThres: 1696281941214, StatsDate: 1528998569000\n'
|
||||||
'Index 0 MediaInfo stream: 1 \n' +
|
+ 'Index 0 MediaInfo stream: 1 \n'
|
||||||
'Video stream 0:1:h264:1918x1080x25:6453995bps \n' +
|
+ 'Video stream 0:1:h264:1918x1080x25:6453995bps \n'
|
||||||
'Audio stream 1:eng:flac:2:96000bps:First Audio Stream \n' +
|
+ 'Audio stream 1:eng:flac:2:96000bps:First Audio Stream \n'
|
||||||
'Audio stream 2:eng:ac3:2:192000bps:Higher Audio Rate \n' +
|
+ 'Audio stream 2:eng:ac3:2:192000bps:Higher Audio Rate \n'
|
||||||
'Audio stream 3:eng:eac3:2:192000bps:Audio stream 4:???:aac:2:96000bps:First Audio Stream \n' +
|
+ 'Audio stream 3:eng:eac3:2:192000bps:Audio stream 4:???:aac:2:96000bps:First Audio Stream \n'
|
||||||
'Audio stream 5:eng:aac:2:96000bps:SubTitles Found, will copy \n' +
|
+ 'Audio stream 5:eng:aac:2:96000bps:SubTitles Found, will copy \n'
|
||||||
'Pre Video Calc: 1080, 1918, 9999, 4142880 \n' +
|
+ 'Pre Video Calc: 1080, 1918, 9999, 4142880 \n'
|
||||||
'Video existing Codex is h264, need to convert to hevc(10) \n' +
|
+ 'Video existing Codex is h264, need to convert to hevc(10) \n'
|
||||||
'Video existing Bitrate, 6453995, is higher than target, 4142880, transcoding \n' +
|
+ 'Video existing Bitrate, 6453995, is higher than target, 4142880, transcoding \n'
|
||||||
'Post Video Calc: 1080, 1918, 9999, 4142880 \n' +
|
+ 'Post Video Calc: 1080, 1918, 9999, 4142880 \n'
|
||||||
'Audio existing Bitrate, 192000, is higher than target, 128000 \n' +
|
+ 'Audio existing Bitrate, 192000, is higher than target, 128000 \n'
|
||||||
'Audio Codec, ac3, is different than target, aac, Changing \n' +
|
+ 'Audio Codec, ac3, is different than target, aac, Changing \n'
|
||||||
'File needs work. Transcoding. \n',
|
+ 'File needs work. Transcoding. \n',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
input: {
|
input: {
|
||||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_3.json')),
|
file: _.cloneDeep(require('../sampleData/media/sampleH264_3.json')),
|
||||||
librarySettings: {},
|
librarySettings: {},
|
||||||
inputs: {test:true},
|
inputs: {
|
||||||
|
test: true,
|
||||||
|
},
|
||||||
otherArguments: {},
|
otherArguments: {},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
|
@ -67,22 +77,23 @@ const tests = [
|
||||||
handBrakeMode: false,
|
handBrakeMode: false,
|
||||||
FFmpegMode: true,
|
FFmpegMode: true,
|
||||||
reQueueAfter: true,
|
reQueueAfter: true,
|
||||||
infoLog: 'StatsThres: 1696281941214, StatsDate: 1528998569000\n' +
|
infoLog: 'StatsThres: 1696281941214, StatsDate: 1528998569000\n'
|
||||||
'Index 0 MediaInfo stream: 1 \n' +
|
+ 'Index 0 MediaInfo stream: 1 \n'
|
||||||
'Video stream 0:1:h264:1918x1080x25:6453995bps \n' +
|
+ 'Video stream 0:1:h264:1918x1080x25:6453995bps \n'
|
||||||
'Audio stream 1:eng:flac:2:96000bps:First Audio Stream \n' +
|
+ 'Audio stream 1:eng:flac:2:96000bps:First Audio Stream \n'
|
||||||
'Audio stream 2:eng:ac3:2:192000bps:Higher Audio Rate \n' +
|
+ 'Audio stream 2:eng:ac3:2:192000bps:Higher Audio Rate \n'
|
||||||
'Audio stream 3:eng:eac3:2:192000bps:Audio stream 4:???:aac:2:96000bps:First Audio Stream \n' +
|
+ 'Audio stream 3:eng:eac3:2:192000bps:Audio stream 4:???:aac:2:96000bps:First Audio Stream \n'
|
||||||
'Audio stream 5:eng:aac:2:96000bps:SubTitles Found, will copy \n' +
|
+ 'Audio stream 5:eng:aac:2:96000bps:SubTitles Found, will copy \n'
|
||||||
'Pre Video Calc: 1080, 1918, 9999, 4142880 \n' +
|
+ 'Pre Video Calc: 1080, 1918, 9999, 4142880 \n'
|
||||||
'Video existing Codex is h264, need to convert to hevc(10) \n' +
|
+ 'Video existing Codex is h264, need to convert to hevc(10) \n'
|
||||||
'Video existing Bitrate, 6453995, is higher than target, 4142880, transcoding \n' +
|
+ 'Video existing Bitrate, 6453995, is higher than target, 4142880, transcoding \n'
|
||||||
'Post Video Calc: 1080, 1918, 9999, 4142880 \n' +
|
+ 'Post Video Calc: 1080, 1918, 9999, 4142880 \n'
|
||||||
'Audio existing Bitrate, 192000, is higher than target, 128000 \n' +
|
+ 'Audio existing Bitrate, 192000, is higher than target, 128000 \n'
|
||||||
'Audio Codec, ac3, is different than target, aac, Changing \n' +
|
+ 'Audio Codec, ac3, is different than target, aac, Changing \n'
|
||||||
'File needs work. Transcoding. \n',
|
+ 'File needs work. Transcoding. \n',
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
void run(tests);
|
void run(tests);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue