mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-25 23:03:52 +01:00
remove durationchanged as it was no longer needed
This commit is contained in:
parent
81a536bbdb
commit
59f8b2d0b5
@ -12,7 +12,6 @@ const notificationPath = `${app.getPath("userData")}/notification.jpg`;
|
|||||||
let currentSong = "";
|
let currentSong = "";
|
||||||
let player;
|
let player;
|
||||||
let currentPlayStatus = statuses.paused;
|
let currentPlayStatus = statuses.paused;
|
||||||
let sduration;
|
|
||||||
let barvalue;
|
let barvalue;
|
||||||
let updatecurrent = false;
|
let updatecurrent = false;
|
||||||
let oldcurrent;
|
let oldcurrent;
|
||||||
@ -267,11 +266,10 @@ setInterval(function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const playStatusChanged = currentStatus !== currentPlayStatus;
|
const playStatusChanged = currentStatus !== currentPlayStatus;
|
||||||
const durationChanged = duration !== sduration;
|
|
||||||
const barvalChanged = barval !== barvalue;
|
const barvalChanged = barval !== barvalue;
|
||||||
const titleOrArtistChanged = currentSong !== songDashArtistTitle;
|
const titleOrArtistChanged = currentSong !== songDashArtistTitle;
|
||||||
|
|
||||||
if (titleOrArtistChanged || playStatusChanged || durationChanged || barvalChanged || updatecurrent) {
|
if (titleOrArtistChanged || playStatusChanged || barvalChanged || updatecurrent) {
|
||||||
// update title and play info with new info
|
// update title and play info with new info
|
||||||
setTitle(songDashArtistTitle);
|
setTitle(songDashArtistTitle);
|
||||||
currentSong = songDashArtistTitle;
|
currentSong = songDashArtistTitle;
|
||||||
@ -281,6 +279,7 @@ setInterval(function () {
|
|||||||
if(barvalue != barval) {
|
if(barvalue != barval) {
|
||||||
barvalue = barval;
|
barvalue = barval;
|
||||||
oldcurrent = options.current;
|
oldcurrent = options.current;
|
||||||
|
options.duration = duration;
|
||||||
updatecurrent = true;
|
updatecurrent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,12 +296,6 @@ setInterval(function () {
|
|||||||
barvalue = barval;
|
barvalue = barval;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(durationChanged) {
|
|
||||||
options.duration = duration;
|
|
||||||
options.current = current;
|
|
||||||
sduration = duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
const image = elements.getSongIcon();
|
const image = elements.getSongIcon();
|
||||||
|
|
||||||
new Promise((resolve) => {
|
new Promise((resolve) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user