sp_track* sp_localtrack_create | ( | const char * | artist, | |
const char * | title, | |||
const char * | album, | |||
int | length | |||
) |
Returns the newly created local track
[in] | artist | Name of the artist |
[in] | title | Song title |
[in] | album | Name of the album, or an empty string if not available |
[in] | length | Length in MS, or -1 if not available. |
The album of the specified track
[in] | track | A track object |
The artist matching the specified index performing on the current track.
[in] | track | The track whose participating artist you are interested in |
[in] | index | The index for the participating artist. Should be in the interval [0, sp_track_num_artists() - 1] |
int sp_track_disc | ( | sp_track * | track | ) |
Returns the disc number for a track
[in] | track | A track object |
int sp_track_duration | ( | sp_track * | track | ) |
The duration, in milliseconds, of the specified track
[in] | track | A track object |
sp_track_availability sp_track_get_availability | ( | sp_session * | session, | |
sp_track * | track | |||
) |
Return availability for a track
[in] | session | Session |
[in] | track | The track |
sp_track* sp_track_get_playable | ( | sp_session * | session, | |
sp_track * | track | |||
) |
Return the actual track that will be played if the given track is played
[in] | session | Session |
[in] | track | The track |
int sp_track_index | ( | sp_track * | track | ) |
Returns the position of a track on its disc
[in] | track | A track object |
bool sp_track_is_autolinked | ( | sp_session * | session, | |
sp_track * | track | |||
) |
Return true if the track is autolinked to another track.
[in] | session | Session |
[in] | track | The track |
bool sp_track_is_loaded | ( | sp_track * | track | ) |
Return whether or not the track metadata is loaded.
[in] | track | The track |
bool sp_track_is_local | ( | sp_session * | session, | |
sp_track * | track | |||
) |
Return true if the track is a local file.
[in] | session | Session |
[in] | track | The track |
bool sp_track_is_placeholder | ( | sp_track * | track | ) |
Return true if the track is a placeholder. Placeholder tracks are used to store other objects than tracks in the playlist. Currently this is used in the inbox to store artists, albums and playlists.
Use sp_link_create_from_track() to get a link object that points to the real object this "track" points to.
[in] | track | The track |
bool sp_track_is_starred | ( | sp_session * | session, | |
sp_track * | track | |||
) |
Return true if the track is starred by the currently logged in user.
[in] | session | Session |
[in] | track | The track |
const char* sp_track_name | ( | sp_track * | track | ) |
The string representation of the specified track's name
[in] | track | A track object |
int sp_track_num_artists | ( | sp_track * | track | ) |
The number of artists performing on the specified track
[in] | track | The track whose number of participating artists you are interested in |
sp_track_offline_status sp_track_offline_get_status | ( | sp_track * | track | ) |
Return offline status for a track. sp_session_callbacks::metadata_updated() will be invoked when offline status of a track changes
[in] | track | The track |
int sp_track_popularity | ( | sp_track * | track | ) |
Returns popularity for track
[in] | track | A track object |
sp_error sp_track_set_starred | ( | sp_session * | session, | |
sp_track *const * | tracks, | |||
int | num_tracks, | |||
bool | star | |||
) |
Star/Unstar the specified track
[in] | session | Session |
[in] | tracks | Array of pointer to tracks. |
[in] | num_tracks | Length of tracks array |
[in] | star | Starred status of the track |