fix: bugs

This commit is contained in:
qier222 2021-03-25 19:29:55 +08:00
parent 91ae6bb107
commit b98bf909fb
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
4 changed files with 18 additions and 17 deletions

View file

@ -161,12 +161,12 @@ export default class {
if (firstTrackID !== "first") this._shuffledList.unshift(firstTrackID);
}
async _scrobble(track, time, complete = false) {
console.log(`scrobble ${track.name} by ${track.ar[0].name}`);
const trackDuration = ~~(track.dt / 1000);
time = complete ? trackDuration : time;
scrobble({
id: track.id,
sourceid: this.playlistSource.id,
time: complete ? trackDuration : time,
time,
});
if (
store.state.lastfm.key !== undefined &&