mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 13:32:42 +01:00
Fix delay of one second when switching at song end
This commit is contained in:
parent
df887b8628
commit
5e952e3899
@ -277,30 +277,31 @@ setInterval(function () {
|
||||
currentSong = songDashArtistTitle;
|
||||
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
|
||||
if(barvalue != barval) {
|
||||
if (barvalue != barval) {
|
||||
barvalue = barval;
|
||||
oldcurrent = options.current;
|
||||
updatecurrent = true;
|
||||
}
|
||||
|
||||
if(updatecurrent) {
|
||||
if(options.current == oldcurrent && currentStatus != "paused") return;
|
||||
if (updatecurrent) {
|
||||
if (options.current == oldcurrent && currentStatus != "paused") return;
|
||||
oldcurrent = options.current;
|
||||
updatecurrent = false;
|
||||
}
|
||||
|
||||
// make sure current is set to 0 if title changes
|
||||
if(titleOrArtistChanged) {
|
||||
options.current = "0:00";
|
||||
barvalue = barval;
|
||||
}
|
||||
|
||||
if(durationChanged) {
|
||||
if (durationChanged) {
|
||||
options.duration = duration;
|
||||
options.current = current;
|
||||
sduration = duration;
|
||||
}
|
||||
}
|
||||
|
||||
const image = elements.getSongIcon();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user