Skip to content

Commit

Permalink
Fix monitor counts and percentages displayed in main monitor pane
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Sep 3, 2018
1 parent 2fac6cc commit 363d1c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
2018-09-03 DariusIII
* Fix: Fix monitor counts and percentages displayed in main monitor pane
* Chg: Update ReleaseRemover class
* Chg: Check for array before inserting audio data from mediainfo
* Chg: Add checks before inserting audio data from mediainfo
Expand Down
8 changes: 4 additions & 4 deletions misc/update/tmux/monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
echo ColorCLI::info("\nThe numbers(queries) above are currently being refreshed. \nNo pane(script) can be (re)started until these have completed.\n");
$timer02 = time();

$splitqry = $tRun->proc_query(4, null, null, $db_name);
$newOldqry = $tRun->proc_query(6, null, null, null);
$splitqry = $tRun->proc_query(4, null, $db_name);
$newOldqry = $tRun->proc_query(6, null, null);

$splitres = (array) array_first(DB::select($splitqry));
$runVar['timers']['newOld'] = (array) array_first(DB::select($newOldqry));
Expand Down Expand Up @@ -273,8 +273,8 @@
$runVar['counts']['diff'][$key] = number_format($proc - $runVar['counts']['start'][$key]);

//calculate percentages -- if user has no releases, set 0 for each key or this will fail on divide by zero
$runVar['counts']['percent'][$key] = ($runVar['counts']['now']['releases'] > 0
? sprintf('%02s', floor(($proc / $runVar['counts']['now']['releases']) * 100)) : 0);
$runVar['counts']['percent'][$key] = $runVar['counts']['now']['releases'] > 0
? sprintf('%02s', floor(($proc / $runVar['counts']['now']['releases']) * 100)) : 0;
}

$runVar['counts']['now']['total_work'] += $runVar['counts']['now']['work'];
Expand Down

0 comments on commit 363d1c5

Please sign in to comment.