Changed lfm scrobble delay to percentage
This commit is contained in:
parent
d99b9d1eac
commit
42e3d4d8e5
3 changed files with 4 additions and 4 deletions
2
index.js
2
index.js
|
@ -65,7 +65,7 @@ const configDefaults = {
|
|||
},
|
||||
"lastfm": {
|
||||
"enabled": false,
|
||||
"scrobble_after": 30,
|
||||
"scrobble_after": 50,
|
||||
"auth_token": "",
|
||||
"enabledRemoveFeaturingArtists": true,
|
||||
"NowPlaying": "true"
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue