core why?

This commit is contained in:
vapormusic 2022-01-11 22:32:42 +07:00
parent 315cafe5f4
commit 710db9c819

View file

@ -61,7 +61,8 @@ const lfm = {
}, },
scrobbleSong: async function (attributes) { scrobbleSong: async function (attributes) {
await new Promise(resolve => setTimeout(resolve, (attributes.durationInMillis / (app.cfg.get('lastfm.scrobble_after') / 100)))); console.log((app.cfg.get('lastfm.scrobble_after') / 100))
await new Promise(resolve => setTimeout(resolve, Math.round(attributes.durationInMillis * (app.cfg.get('lastfm.scrobble_after') / 100))));
const currentAttributes = app.media; const currentAttributes = app.media;
if (!app.lastfm || app.lastfm.cachedAttributes === attributes ) { if (!app.lastfm || app.lastfm.cachedAttributes === attributes ) {