Changed lfm scrobble delay to percentage

This commit is contained in:
Core 2022-01-10 20:23:54 +00:00
parent d99b9d1eac
commit 42e3d4d8e5
No known key found for this signature in database
GPG key ID: 1B77805746C47C28
3 changed files with 4 additions and 4 deletions

View file

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