From 1486613744c4b73d25d43b4e46d816f9d3df33fb Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Fri, 17 Jan 2025 18:55:35 +0000 Subject: [PATCH] fix(spotify): Generate played object from player cleanup with correct 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 --- src/backend/sources/MemorySource.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/sources/MemorySource.ts b/src/backend/sources/MemorySource.ts index 2eafba7b..e63985cc 100644 --- a/src/backend/sources/MemorySource.ts +++ b/src/backend/sources/MemorySource.ts @@ -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);