From f140ce22fef33cfa31f8c36e5be2dc4b87890574 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 29 Mar 2024 16:46:00 -0700 Subject: [PATCH] chore: scrobble --- api/scrobble.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/scrobble.js b/api/scrobble.js index c577dfdb..3594a9ce 100644 --- a/api/scrobble.js +++ b/api/scrobble.js @@ -15,6 +15,11 @@ const weekStop = () => { const filterOldScrobbles = (scrobbles) => { const twoWeeksAgo = DateTime.now().minus({ weeks: 2 }); + console.log(scrobbles) + console.log(scrobbles.filter(scrobble => { + const timestamp = DateTime.fromISO(scrobble.timestamp); + return timestamp >= twoWeeksAgo; + })) return scrobbles.filter(scrobble => { const timestamp = DateTime.fromISO(scrobble.timestamp); return timestamp >= twoWeeksAgo;