LocalTrack

@Serializable
data class LocalTrack(val album: SimpleLocalAlbum, val artists: List<SimpleLocalArtist>, val href: String? = null, val id: String? = null, val discNumber: String? = null, val durationMs: Int? = null, val explicit: Boolean? = null, val isLocal: Boolean = true, val name: String, val popularity: Double? = null, val trackNumber: Int? = null, val type: String, val uri: LocalTrackUri) : IdentifiableNullable, Playable(source)

Local track object that representing a song uploaded from a client locally

Parameters

artists

The artists who performed the track.

discNumber

The disc number.

durationMs

The track length in milliseconds.

explicit

Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).

href

A link to the Web API endpoint providing full details of the track.

id

The Spotify ID for the track.

name

The name of the track.

trackNumber

The number of the track. If an album has several discs, the track number is the number on the specified disc.

type

The object type: “track”.

isLocal

Whether or not the track is from a local file.

popularity

the popularity of this track. possibly null

Constructors

Link copied to clipboard
constructor(album: SimpleLocalAlbum, artists: List<SimpleLocalArtist>, href: String? = null, id: String? = null, discNumber: String? = null, durationMs: Int? = null, explicit: Boolean? = null, isLocal: Boolean = true, name: String, popularity: Double? = null, trackNumber: Int? = null, type: String, uri: LocalTrackUri)

Properties

Link copied to clipboard
Link copied to clipboard
@Transient
lateinit var api: GenericSpotifyApi

The API client associated with the request

Link copied to clipboard
Link copied to clipboard

This Playable as a local track, or else null if it is an episode or track.

Link copied to clipboard

This Playable as an episode (podcast), or else null if it is a local track or track.

Link copied to clipboard
open val asTrack: Track?

This Playable as a track, or else null if it is a local track or episode (podcast).

Link copied to clipboard
@SerialName(value = "disc_number")
val discNumber: String? = null
Link copied to clipboard
@SerialName(value = "duration_ms")
val durationMs: Int? = null
Link copied to clipboard
@SerialName(value = "explicit")
val explicit: Boolean? = null
Link copied to clipboard
open override val href: String? = null
Link copied to clipboard
open override val id: String? = null
Link copied to clipboard
@SerialName(value = "is_local")
val isLocal: Boolean = true
Link copied to clipboard
Link copied to clipboard
val popularity: Double? = null
Link copied to clipboard
@SerialName(value = "track_number")
val trackNumber: Int? = null
Link copied to clipboard
open override val type: String
Link copied to clipboard
open override val uri: LocalTrackUri

The URI associated with the object.

Functions

Link copied to clipboard
suspend fun searchForSpotifyTrack(limit: Int? = null, offset: Int? = null, market: Market? = null): PagingObject<Track>

Search for this local track by name in Spotify's track catalog.

Link copied to clipboard
fun searchForSpotifyTrackRestAction(limit: Int? = null, offset: Int? = null, market: Market? = null): SpotifyRestAction<PagingObject<Track>>

Search for this local track by name in Spotify's track catalog.