From bf857f0fedfbb1350a6ada82742ff3f29fce1a1b Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:58:58 +0800 Subject: [PATCH] Update objects.js --- web/static/js/objects.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/static/js/objects.js b/web/static/js/objects.js index 2b3d4f6..56f5db3 100644 --- a/web/static/js/objects.js +++ b/web/static/js/objects.js @@ -457,13 +457,19 @@ class Player { $("#length").text("00:00"); $("#image").removeAttr('src'); $("#largeImage").removeAttr('src'); + $(".thumbnail-background").css("background", "") } else { $("#title").text(currentTrack.title); $("#author").text(currentTrack.author); $("#length").text(this.msToReadableTime(currentTrack.length)); $("#image").attr("src", currentTrack.imageUrl); - $("#largeImage").attr("src", `${window.location.protocol}//${window.location.hostname}:${window.location.port}/` + currentTrack.imageUrl); + + var image = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/` + currentTrack.imageUrl + if ($("#largeImage").attr("src") != image) { + $("#largeImage").attr("src", image); + } } + $("#channel-name").text((this.channelName == "") ? "Not Found" : this.channelName); var play_pause_btn = $("#play-pause-button"); var repeat_btn = $("#repeat-button");