Skip to content

Commit

Permalink
fix(spotify): Generate played object from player cleanup with correct…
Browse files Browse the repository at this point in the history
… timestamp

Missing arg to pass to getPlayedObject to ensure the timestamp used for playDate is the same as normally discovered tracks. Without the arg two tracks played with the second being scrobbled on stale would cause the latter to have the same TS as the former

fixes #254
  • Loading branch information
FoxxMD committed Jan 17, 2025
1 parent f251620 commit 1486613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/sources/MemorySource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export default class MemorySource extends AbstractSource {
// if we haven't already tried to discover any in-progress plays then do it now (and only once)
if(!this.playerCleanupDiscoveryAttempt.has(key)) {
this.playerCleanupDiscoveryAttempt.set(key, true);
const cleanupPlay = player.getPlayedObject();
// get play as completed
const cleanupPlay = player.getPlayedObject(true);
let discoverablePlay: boolean;
if(cleanupPlay !== undefined) {
const [discoverable, discoverableReason] = this.isListenedPlayDiscoverable(cleanupPlay);
Expand Down

0 comments on commit 1486613

Please sign in to comment.