• Tracks when a track was last logged to prevent duplicate logs

    Records the timestamp when a specific track was last logged or processed, which helps prevent duplicate logging or processing of the same track within a short time period.

    Parameters

    • trackId: string

      Spotify track ID to record

    • timestamp: number

      Millisecond timestamp when the track was logged

    Returns void

    // Record that we've just logged a track
    setTrackLastLogged('spotify:track:1234567890', Date.now());
    export function setTrackLastLogged(trackId: string, timestamp: number): void {
    trackLastLogged[trackId] = timestamp;
    }