Fix partial info rendering

main
Jerry Aldrich 5 years ago
parent 25939bc131
commit a7c673eaa0
  1. 22
      player.html

@ -234,20 +234,30 @@
streamLines.push("/" + "-".repeat(width - 2) + "\\")
streamLines.push(titleLine)
if (songName != "") {
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 (listeners != "") {
if (songName == "") {
if (songName != "") {
streamLines.push("|" + " ".repeat(width - 2) + "|")
streamLines.push(songNameLine)
}
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) + "|")
}

Loading…
Cancel
Save