Enhanced skipped track information with detailed classification

Comprehensive data structure for recording a skip event with detailed contextual information, analysis results, and metadata. This structure provides the foundation for sophisticated skip analytics and pattern recognition.

export interface SkipInfo {
/** Spotify track ID */
id: string;

/** Track name */
name: string;

/** Artist name */
artist: string;

/** Album name (optional) */
album?: string;

/** Timestamp when skip occurred (milliseconds since epoch) */
skippedAt: number;

/** Duration track was played before skipping (milliseconds) */
playDuration: number;

/** Total track duration (milliseconds) */
trackDuration: number;

/** Percentage of track played before skipping (0.0-1.0) */
playPercentage: number;

/** Spotify device ID where skip occurred */
deviceId?: string;

/** Spotify device name where skip occurred */
deviceName?: string;

/** Classification of skip type (preview, standard, near_end, etc.) */
skipType: string;

/** Whether skip appears to be manual vs. automatic */
isManualSkip: boolean;

/** Confidence in skip classification (0.0-1.0) */
confidence: number;

/** Human-readable explanation of skip classification */
reason: string;

/** Whether the track is in the user's library */
isInLibrary?: boolean;

/** Listening context information */
context?: {
/** Context type: 'playlist', 'album', 'artist', 'collection', 'radio', etc. */
type: string;

/** Spotify URI of the context */
uri?: string;

/** Human-readable name of the context */
name?: string;

/** Spotify ID of the context */
id?: string;
};
}
interface SkipInfo {
    id: string;
    name: string;
    artist: string;
    album?: string;
    skippedAt: number;
    playDuration: number;
    trackDuration: number;
    playPercentage: number;
    deviceId?: string;
    deviceName?: string;
    skipType: string;
    isManualSkip: boolean;
    confidence: number;
    reason: string;
    isInLibrary?: boolean;
    context?: { type: string; uri?: string; name?: string; id?: string };
}

Properties

id: string

Spotify track ID

name: string

Track name

artist: string

Artist name

album?: string

Album name (optional)

skippedAt: number

Timestamp when skip occurred (milliseconds since epoch)

playDuration: number

Duration track was played before skipping (milliseconds)

trackDuration: number

Total track duration (milliseconds)

playPercentage: number

Percentage of track played before skipping (0.0-1.0)

deviceId?: string

Spotify device ID where skip occurred

deviceName?: string

Spotify device name where skip occurred

skipType: string

Classification of skip type (preview, standard, near_end, etc.)

isManualSkip: boolean

Whether skip appears to be manual vs. automatic

confidence: number

Confidence in skip classification (0.0-1.0)

reason: string

Human-readable explanation of skip classification

isInLibrary?: boolean

Whether the track is in the user's library

context?: { type: string; uri?: string; name?: string; id?: string }

Listening context information

Type declaration

  • type: string

    Context type: 'playlist', 'album', 'artist', 'collection', 'radio', etc.

  • Optionaluri?: string

    Spotify URI of the context

  • Optionalname?: string

    Human-readable name of the context

  • Optionalid?: string

    Spotify ID of the context