This commit is contained in:
vapormusic 2022-01-11 10:37:50 +07:00
commit ea79110c50
3 changed files with 4 additions and 4 deletions

View file

@ -66,7 +66,7 @@ const configDefaults = {
},
"lastfm": {
"enabled": false,
"scrobble_after": 30,
"scrobble_after": 50,
"auth_token": "",
"enabledRemoveFeaturingArtists": true,
"NowPlaying": "true"

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 ) {

View file

@ -454,10 +454,10 @@
</div>
<div class="md-option-line" v-show ="app.cfg.lastfm.enabled">
<div class="md-option-segment">
LastFM Scrobble Delay
LastFM Scrobble Delay (%)
</div>
<div class="md-option-segment md-option-segment_auto" >
<input type="number" v-model="app.cfg.lastfm.scrobble_after"/>
<input type="number" min="50" max="100" v-model="app.cfg.lastfm.scrobble_after"/>
</div>
</div>
<div class="md-option-line" v-show ="app.cfg.lastfm.enabled">