mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 18:25:54 -07:00
More accurate hb 2 pass logic
This commit is contained in:
parent
f73157eb82
commit
d949b203e5
4 changed files with 34 additions and 14 deletions
|
|
@ -85,6 +85,8 @@ class CLI {
|
|||
|
||||
lastProgCheck = 0;
|
||||
|
||||
hbPass = 0;
|
||||
|
||||
constructor(config: Iconfig) {
|
||||
this.config = config;
|
||||
}
|
||||
|
|
@ -163,9 +165,17 @@ class CLI {
|
|||
}
|
||||
|
||||
if (this.config.cli.toLowerCase().includes('handbrake')) {
|
||||
if (str.includes('task 1 of 2')) {
|
||||
this.hbPass = 1;
|
||||
} else if (str.includes('task 2 of 2')) {
|
||||
this.hbPass = 2;
|
||||
}
|
||||
|
||||
const percentage = handbrakeParser({
|
||||
str,
|
||||
hbPass: this.hbPass,
|
||||
});
|
||||
|
||||
if (percentage > 0) {
|
||||
this.updateETA(percentage);
|
||||
this.config.updateWorker({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue