From 363d1c545e109bfae84fafb093a0a3af96b1a889 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Mon, 3 Sep 2018 14:35:20 +0200 Subject: [PATCH] Fix monitor counts and percentages displayed in main monitor pane --- Changelog | 1 + misc/update/tmux/monitor.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 1fc3e0066e..83a81d117d 100755 --- a/Changelog +++ b/Changelog @@ -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 diff --git a/misc/update/tmux/monitor.php b/misc/update/tmux/monitor.php index 2bad6f2d15..70b7f21b08 100644 --- a/misc/update/tmux/monitor.php +++ b/misc/update/tmux/monitor.php @@ -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)); @@ -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'];