revert last change

This commit is contained in:
Marie 2021-04-20 22:15:34 +02:00 committed by GitHub
parent 5e952e3899
commit 81a536bbdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -277,12 +277,6 @@ setInterval(function () {
currentSong = songDashArtistTitle; currentSong = songDashArtistTitle;
currentPlayStatus = currentStatus; currentPlayStatus = currentStatus;
// make sure current is set to 0 if title changes
if (titleOrArtistChanged) {
options.current = "0:00";
oldcurrent = options.current;
barvalue = barval;
} else {
// check progress bar value and make sure current stays up to date after switch // check progress bar value and make sure current stays up to date after switch
if(barvalue != barval) { if(barvalue != barval) {
barvalue = barval; barvalue = barval;
@ -296,12 +290,18 @@ setInterval(function () {
updatecurrent = false; updatecurrent = false;
} }
// make sure current is set to 0 if title changes
if(titleOrArtistChanged) {
options.current = "0:00";
oldcurrent = options.current;
barvalue = barval;
}
if(durationChanged) { if(durationChanged) {
options.duration = duration; options.duration = duration;
options.current = current; options.current = current;
sduration = duration; sduration = duration;
} }
}
const image = elements.getSongIcon(); const image = elements.getSongIcon();