chore: scrobbles

This commit is contained in:
Cory Dransfeldt 2024-03-29 16:36:31 -07:00
parent bb7fd5a6a6
commit 14706f4217

View file

@ -15,8 +15,8 @@ const weekStop = () => {
const filterOldScrobbles = (scrobbles) => {
const twoWeeksAgo = DateTime.now().minus({ weeks: 2 });
return scrobbles.filter(obj => {
const timestamp = DateTime.fromISO(obj.timestamp);
return scrobbles.filter(scrobble => {
const timestamp = DateTime.fromISO(scrobble.timestamp);
return timestamp >= twoWeeksAgo;
});
}