Add condition if last music is same

This commit is contained in:
2022-01-17 21:28:56 +01:00
parent ab9712b05b
commit ad93c49653

View File

@@ -16,6 +16,8 @@ async function LogSpotifyHistory(): Promise<void> {
if (last_entry && new Date().getTime() - last_entry.duration <= new Date(last_entry.date).getTime()) return
if (last_entry && last_entry.item_name === current.name) return
await Song.create({
date: new Date(current.started_at!),
duration: current.duration,