CollectionPolicy

@IviExperimental(reasons = [])
interface CollectionPolicy

This policy specifies a group of tools to work with collections.

A collection is a group of media items with a semantic grouping. A list of podcast episodes can be a collection, as is a playlist.

These tools help determine if an IviMediaItem parent item is a collection, and provide actions to follow a media item as a collection. Following a collection needs to be supported by the source, and usually means that the collection is saved to the user profile (e.g. follow a podcast to receive notification of new episodes, like a playlist to have it in the favorites list).

Inheritors

Functions

Link copied to clipboard
open fun getFollowCollectionAction(mediaItem: IviMediaItem): BrowserAction<StringResolver?>?

Returns a BrowserAction to follow mediaItem as a collection, if mediaItem supports following, and null otherwise.

Link copied to clipboard
open fun getFollowCollectionIcon(mediaItem: IviMediaItem): DrawableResolver?

Returns an icon for the follow collection button, if mediaItem supports following, and null otherwise.

Link copied to clipboard

Returns a BrowserAction that can be used to determine if mediaItem is a followed collection. If mediaItem doesn't support the following action returns null.

Link copied to clipboard
open fun getUnfollowCollectionAction(mediaItem: IviMediaItem): BrowserAction<StringResolver?>?

Returns a BrowserAction to unfollow mediaItem as a collection, if mediaItem supports following, and null otherwise.

Link copied to clipboard
open fun isCollection(mediaItem: IviMediaItem): Boolean

Determines if a mediaItem is a collection. This can be used to open the collection panel instead of a normal browsing panel.