mirror of
https://github.com/morpheusthewhite/spicetify-themes.git
synced 2024-11-22 10:52:48 +01:00
fix(Turntable): automatically update the song preview when toggle the Shuffle in some scenes
- toggle the Shuffle in the Touch Bar - Connect to a device
This commit is contained in:
parent
7cfaf35d8d
commit
adf523cc98
@ -251,6 +251,14 @@ window.addEventListener("load", rotateTurntable = () => {
|
|||||||
|
|
||||||
handleRotate("load");
|
handleRotate("load");
|
||||||
|
|
||||||
|
const shuffleBtn = document.querySelector(".main-shuffleButton-button");
|
||||||
|
const shuffleObserver = new MutationObserver(() => {
|
||||||
|
setTimeout(handleTracksNamePreview, 500);
|
||||||
|
});
|
||||||
|
shuffleObserver.observe(shuffleBtn, {
|
||||||
|
attributes: true,
|
||||||
|
});
|
||||||
|
|
||||||
Spicetify.Player.addEventListener("onplaypause", () => handleRotate("playpause"));
|
Spicetify.Player.addEventListener("onplaypause", () => handleRotate("playpause"));
|
||||||
Spicetify.Player.addEventListener("songchange", () => {
|
Spicetify.Player.addEventListener("songchange", () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user