Skip to content
Permalink
Browse files

fix for crossroads, empty genre chart

  • Loading branch information...
RocketMan committed Apr 29, 2019
1 parent a6bda6a commit 5aac615d76b09914f7420b64d2b49e56ad474367
Showing with 7 additions and 1 deletion.
  1. +7 −1 controllers/RunDaily.php
@@ -159,6 +159,7 @@ private function getAddresses() {
private function buildChart($start, $end, $limit="", $category="", $cmj=0, $crd=0) {
$result = "";
$chart = [];
$chartApi = Engine::api(IChart::class);
$chartApi->getChart($chart, $start, $end, $limit, $category);
if(sizeof($chart)) {
@@ -179,7 +180,12 @@ private function buildChart($start, $end, $limit="", $category="", $cmj=0, $crd=
else if(!$crd)
$line = sprintf("%4s %-23s %-26s %23s\n",
"Rank", "Artist", "Album", "Label");
$result .= $line;
else
$line = "";
if($line)
$result .= $line;
for($i=0; $i < sizeof($chart); $i++) {
// Fixup the artist, album, and label names
$artist = $chart[$i]["artist"];

0 comments on commit 5aac615

Please sign in to comment.
You can’t perform that action at this time.