From a7c673eaa059888d39b287f1fef644766de7e7c1 Mon Sep 17 00:00:00 2001 From: Jerry Aldrich Date: Fri, 26 Jun 2020 18:23:55 -0700 Subject: [PATCH] Fix partial info rendering --- player.html | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/player.html b/player.html index b24f7b6..65481e1 100644 --- a/player.html +++ b/player.html @@ -234,20 +234,30 @@ streamLines.push("/" + "-".repeat(width - 2) + "\\") streamLines.push(titleLine) + if (songName == "" && listeners == "" && streamURL != "") { + songNameLine = buildLine(width, "Loading...", " Song Title: ") + listenersLine = buildLine(width, "Loading...", " Listeners: ") + + streamLines.push("|" + " ".repeat(width - 2) + "|") + streamLines.push(songNameLine) + streamLines.push(listenersLine) + } + if (songName != "") { streamLines.push("|" + " ".repeat(width - 2) + "|") streamLines.push(songNameLine) } - if (listeners != "") { - if (songName == "") { - streamLines.push("|" + " ".repeat(width - 2) + "|") - } + + if (songName == "" && listeners != "") { + streamLines.push("|" + " ".repeat(width - 2) + "|") + songNameLine = buildLine(width, "Loading...", " Song Title: ") + streamLines.push(songNameLine) + streamLines.push(listenersLine) + } else if (listeners != "") { streamLines.push(listenersLine) } + if (streamURL != "") { - if (songName == "" && listeners == "") { - streamLines.push("|" + " ".repeat(width - 2) + "|") - } streamLines.push(downloadLine) streamLines.push("|" + " ".repeat(width - 2) + "|") }