2026-05-15 09:03:20 +02:00
|
|
|
package at.lockstep.player.playback
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Fired when annotation should flush beats for the track being left:
|
|
|
|
|
* user skipped, auto-advance after a track ended, or the last track finished.
|
|
|
|
|
*/
|
|
|
|
|
data class TrackBoundaryEvent(
|
|
|
|
|
val trackId: String,
|
|
|
|
|
val title: String,
|
|
|
|
|
val artist: String,
|
2026-05-31 12:10:02 +02:00
|
|
|
/** 0-based index in the paired-only play queue when this track was current. */
|
2026-05-15 09:03:20 +02:00
|
|
|
val queueIndex: Int,
|
2026-05-31 12:10:02 +02:00
|
|
|
/** 0-based position in the full Spotify playlist (used for beat/run-data file slots). */
|
|
|
|
|
val playlistPosition: Int,
|
2026-05-15 09:03:20 +02:00
|
|
|
val queueSize: Int,
|
|
|
|
|
val reason: TrackBoundaryReason,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
enum class TrackBoundaryReason {
|
|
|
|
|
/** Left this track for another (skip, previous, or middle track ended). */
|
|
|
|
|
ADVANCED_TO_OTHER_TRACK,
|
|
|
|
|
|
|
|
|
|
/** Playback of the last track in the playlist completed. */
|
|
|
|
|
LAST_TRACK_FINISHED,
|
|
|
|
|
}
|