You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The progress information seems to be out of sync by ~1s when the last song finishes and the next song continues to play. But when manually skipping to the next song, this does not happen. Also, if the player is paused then start playing again it will be corrected. Here is an extension script I used to reproduce this bug:
(functiontest(){console.log("Testing");lastPaused=0;Spicetify.Player.addEventListener("songchange",({ data })=>{console.log("=======Song changed========");wrong_beginning=Spicetify.Player.data.timestamp-Spicetify.Player.data.positionAsOfTimestamp;console.log("Timestamp of the song's beginning",wrong_beginning);setTimeout(async()=>{console.log("Restarting player by pause and play");Spicetify.Player.pause();Spicetify.Player.play();awaitnewPromise(resolve=>setTimeout(resolve,500));correct_beginning=Spicetify.Player.data.timestamp-Spicetify.Player.data.positionAsOfTimestamp;console.log("Timestamp of the song's beginning now (fixed)",correct_beginning);console.log("Difference",correct_beginning-wrong_beginning);console.log(" ");},1000);});Spicetify.Player.addEventListener("onplaypause",({ data })=>{if(Spicetify.Player.data.isPaused){lastPaused=Date.now();}else{if(lastPaused>0){console.log("<Paused for",Date.now()-lastPaused,">");lastPaused=0;}}});})();
It also seems that the "songchange" event callback is called earlier than when the song actually started.
I don't know much js so I'm not sure if this is an actual bug, and if not I would love to know how to get the desired result!
πΈ Screenshots
Here's the console output when the last song finishes and the next song continues to play:
Here's the console output when manually skipping to the next song:
The text was updated successfully, but these errors were encountered:
π Have you checked Spicetify.app page for your issue?
π Is there already an issue for your problem?
βΉ Environment / Computer Info
π Description
The progress information seems to be out of sync by ~1s when the last song finishes and the next song continues to play. But when manually skipping to the next song, this does not happen. Also, if the player is paused then start playing again it will be corrected. Here is an extension script I used to reproduce this bug:
It also seems that the "songchange" event callback is called earlier than when the song actually started.
I don't know much js so I'm not sure if this is an actual bug, and if not I would love to know how to get the desired result!
πΈ Screenshots
Here's the console output when the last song finishes and the next song continues to play:
Here's the console output when manually skipping to the next song:
The text was updated successfully, but these errors were encountered: