Skip to content

Commit

Permalink
fix background not resetting on midi
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Aug 6, 2024
1 parent 7e49fd5 commit 30e89b5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 40 deletions.
11 changes: 7 additions & 4 deletions src/website/js/music_mode_ui/music_mode_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,18 @@ export class MusicModeUI {
setInfoText("player_info_creation", verifyDecode('ICRD', "", decoder) + verifyDecode('ICRT', "", decoder, "\n"));
setInfoText("player_info_comment", verifyDecode('ICMT', "", decoder));

// embedded stuff
// image
const svg = this.mainDiv.getElementsByTagName("svg")[0];
const img = this.mainDiv.getElementsByTagName("img")[0];
const bg = document.getElementById("player_info_background_image");
if(!mid.isEmbedded)
{
svg.style.display = "";
img.style.display = "none";
bg.style.setProperty("--bg-image", "undefined");
return;
}
// add album cover if available
const svg = this.mainDiv.getElementsByTagName("svg")[0];
const img = this.mainDiv.getElementsByTagName("img")[0];
const bg = document.getElementById("player_info_background_image");
if(mid.RMIDInfo["IPIC"] === undefined)
{
svg.style.display = "";
Expand Down
Loading

0 comments on commit 30e89b5

Please sign in to comment.