diff --git a/README.md b/README.md index c02fd20..e994030 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a tweaked version of the Default theme. The main differences are the the light/dark toggle, the background cover and the dynamic highligh color, ie. it will match the current album art. -Requires spicetify-cli **v2.2 or newer**. +Requires spicetify-cli **v2.6 or newer**. ## Screenshots ![demo-base](./Dark.gif) diff --git a/default-dynamic.js b/default-dynamic.js index 74e46a2..9cdec87 100644 --- a/default-dynamic.js +++ b/default-dynamic.js @@ -1,4 +1,4 @@ -let current = '2.8' +let current = '2.9' function waitForElement(els, func, timeout = 100) { const queries = els.map(el => document.querySelector(el)) @@ -222,7 +222,7 @@ function pickCoverColor(img) { function hookCoverChange(pick) { waitForElement([".cover-art-image"], (queries) => { coverListenerInstalled = true - if (pick) pickCoverColor(queries[0]) + if (pick && queries[0].complete && queries[0].naturalHeight !== 0) pickCoverColor(queries[0]) queries[0].addEventListener('load', function() { try { pickCoverColor(queries[0])