diff --git a/src/main/lastfm.js b/src/main/lastfm.js index 2178645e..0c453797 100644 --- a/src/main/lastfm.js +++ b/src/main/lastfm.js @@ -61,7 +61,8 @@ const lfm = { }, 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; if (!app.lastfm || app.lastfm.cachedAttributes === attributes ) {