Fix partial info rendering

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

@ -234,20 +234,30 @@
streamLines.push("/" + "-".repeat(width - 2) + "\\") streamLines.push("/" + "-".repeat(width - 2) + "\\")
streamLines.push(titleLine) 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 != "") { if (songName != "") {
streamLines.push("|" + " ".repeat(width - 2) + "|") streamLines.push("|" + " ".repeat(width - 2) + "|")
streamLines.push(songNameLine) streamLines.push(songNameLine)
} }
if (listeners != "") {
if (songName == "") { if (songName == "" && listeners != "") {
streamLines.push("|" + " ".repeat(width - 2) + "|") streamLines.push("|" + " ".repeat(width - 2) + "|")
} songNameLine = buildLine(width, "Loading...", " Song Title: ")
streamLines.push(songNameLine)
streamLines.push(listenersLine)
} else if (listeners != "") {
streamLines.push(listenersLine) streamLines.push(listenersLine)
} }
if (streamURL != "") { if (streamURL != "") {
if (songName == "" && listeners == "") {
streamLines.push("|" + " ".repeat(width - 2) + "|")
}
streamLines.push(downloadLine) streamLines.push(downloadLine)
streamLines.push("|" + " ".repeat(width - 2) + "|") streamLines.push("|" + " ".repeat(width - 2) + "|")
} }

Loading…
Cancel
Save