EchoMediaItem

sealed interface EchoMediaItem

A class representing a media item in Echo.

Use toShelf to convert a media item to Shelf.Item.

Example:

val track = api.getTrack("track_id")
val shelfItem = mediaItem.toShelf()

See also

Inheritors

Types

Link copied to clipboard
sealed interface Lists : EchoMediaItem

Properties

Link copied to clipboard
abstract val background: ImageHolder?

The background image of the media item, used to display a background image

Link copied to clipboard
abstract val cover: ImageHolder?

The cover image of the media item

Link copied to clipboard
abstract val description: String?

A description of the media item, used to display additional information

Link copied to clipboard
abstract val extras: Map<String, String>

Any extra data you want to associate with the media item

Link copied to clipboard
abstract val id: String

The id of the media item

Link copied to clipboard
Link copied to clipboard
abstract val isFollowable: Boolean

Whether the media item can be followed. Checkout FollowClient

Link copied to clipboard
abstract val isHideable: Boolean

Whether the media item can be hidden. Checkout HideClient

Link copied to clipboard
abstract val isLikeable: Boolean

Whether the media item can be liked. Checkout LikeClient

Link copied to clipboard
open val isPrivate: Boolean
Link copied to clipboard

Whether the media item can be loaded to get Radio. Checkout RadioClient

Link copied to clipboard
abstract val isSaveable: Boolean

Whether the media item can be saved to library. Checkout SaveClient

Link copied to clipboard
abstract val isShareable: Boolean

Whether the media item can be shared. Checkout ShareClient

Link copied to clipboard
abstract val subtitle: String?

The subtitle of the media item, used to display information under the title

Link copied to clipboard
open val subtitleWithE: <Error class: unknown class>
Link copied to clipboard
abstract val subtitleWithOutE: String?
Link copied to clipboard
abstract val title: String

The title of the media item

Functions

Link copied to clipboard
open fun copyMediaItem(id: String = this.id, title: String = this.title, cover: ImageHolder? = this.cover, description: String? = this.description, subtitle: String? = this.subtitle, extras: Map<String, String> = this.extras, isRadioSupported: Boolean = this.isRadioSupported, isFollowable: Boolean = this.isFollowable, isSaveable: Boolean = this.isSaveable): EchoMediaItem
Link copied to clipboard
open fun sameAs(other: EchoMediaItem): Boolean
Link copied to clipboard
open fun toShelf(): Shelf.Item