Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
ContentUtils Class Reference

#include <ContentUtils.h>

Public Types

enum class  PlayMode { CHECK_AUTO_PLAY_NEXT_ITEM , PLAY_FROM_HERE , PLAY_ONLY_THIS }
 Defines play modes to be used in conjunction with the setting "play next video|song automatically". More...
 

Static Public Member Functions

static const std::string GetPreferredArtImage (const CFileItem &item)
 Gets the preferred art image for a given item (depending on its media type). Provided a CFileItem with many art types on its art map, this method will return a default preferred image (content dependent) for situations where the the client expects a single image to represent the item. For instance, for movies and shows this will return the poster, while for episodes it will return the thumb.
 
static std::unique_ptr< CFileItemGeneratePlayableTrailerItem (const CFileItem &item, const std::string &label)
 Gets a trailer playable file item for a given item. Essentially this creates a new item which contains the original item infotag and has the playable path and label changed.
 

Member Enumeration Documentation

◆ PlayMode

enum class ContentUtils::PlayMode
strong

Defines play modes to be used in conjunction with the setting "play next video|song automatically".

Enumerator
CHECK_AUTO_PLAY_NEXT_ITEM 
PLAY_FROM_HERE 

play from here, or play only this, according to settings value

PLAY_ONLY_THIS 

queue all successors and play them after item, ignoring the settings value

Member Function Documentation

◆ GeneratePlayableTrailerItem()

std::unique_ptr< CFileItem > ContentUtils::GeneratePlayableTrailerItem ( const CFileItem & item,
const std::string & label )
static

Gets a trailer playable file item for a given item. Essentially this creates a new item which contains the original item infotag and has the playable path and label changed.

Parameters
itemThe CFileItem to process
labelThe label for the new item
Returns
a pointer to the trailer item

◆ GetPreferredArtImage()

const std::string ContentUtils::GetPreferredArtImage ( const CFileItem & item)
static

Gets the preferred art image for a given item (depending on its media type). Provided a CFileItem with many art types on its art map, this method will return a default preferred image (content dependent) for situations where the the client expects a single image to represent the item. For instance, for movies and shows this will return the poster, while for episodes it will return the thumb.

Parameters
itemThe CFileItem to process
Returns
the preferred art image

The documentation for this class was generated from the following files: