AudioFile

class AudioFile(id: String)

A media file with codec, bitrate, URL, Track, Artist, and Release information.

Constructors

AudioFile
Link copied to clipboard
fun AudioFile(id: String)

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
setDisliked
Link copied to clipboard
fun setDisliked()

Indicate that the user dislikes this AudioFile or not.

setLiked
Link copied to clipboard
fun setLiked()

Indicate that the user likes this AudioFile or not.

setUnliked
Link copied to clipboard
fun setUnliked()

Indicate that the user neither likes nor dislikes the current song.

toString
Link copied to clipboard
open override fun toString(): String

Properties

artist
Link copied to clipboard
@SerializedName(value = "artist")
lateinit var artist: Artist

Information about the Artist

bitrate
Link copied to clipboard
@SerializedName(value = "bitrate")
var bitrate: String? = null

Bitrate of the Audio file

canCache
Link copied to clipboard
@SerializedName(value = "can_cache")
val canCache: Boolean = false
canSeek
Link copied to clipboard
@SerializedName(value = "can_seek")
val canSeek: Boolean = false
codec
Link copied to clipboard
@SerializedName(value = "codec")
var codec: String? = null

Codec used to encode the Audio file

durationInSeconds
Link copied to clipboard
@SerializedName(value = "duration_in_seconds")
var durationInSeconds: Float

Duration of the track in seconds

endTrim
Link copied to clipboard
val endTrim: Float
id
Link copied to clipboard
@SerializedName(value = "id")
val id: String
isDisliked
Link copied to clipboard
var isDisliked: Boolean = false
isFavorite
Link copied to clipboard
@SerializedName(value = "favorited")
var isFavorite: Boolean = false
isLiked
Link copied to clipboard
@SerializedName(value = "liked")
var isLiked: Boolean = false

Information about whether the current user has liked this song in the past

metadata
Link copied to clipboard
@SerializedName(value = "extra")
var metadata: Map<String, Any>? = null
release
Link copied to clipboard
@SerializedName(value = "release")
lateinit var release: Release

Information about the Album

replayGain
Link copied to clipboard
@SerializedName(value = "replaygain_track_gain")
var replayGain: Float

Get loudness of replay gain

startTrim
Link copied to clipboard
val startTrim: Float
track
Link copied to clipboard
@SerializedName(value = "track")
lateinit var track: Track

Information about the Track

url
Link copied to clipboard
@SerializedName(value = "url")
lateinit var url: String

Url of the Audio file