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

The class' operator() decides if the given (subtitle) SelectionStream lh is 'better than' the given (subtitle) SelectionStream rh. If lh is 'better than' rh the return value is true, false otherwise. More...

Public Member Functions

 PredicateSubtitlePriority (const std::string &lang, int stream, bool ison)
 
bool relevant (const SelectionStream &ss) const
 
bool operator() (const SelectionStream &lh, const SelectionStream &rh) const
 

Detailed Description

The class' operator() decides if the given (subtitle) SelectionStream lh is 'better than' the given (subtitle) SelectionStream rh. If lh is 'better than' rh the return value is true, false otherwise.

A subtitle lh is 'better than' a subtitle rh (in evaluation order) if

  • lh was previously selected, or
  • lh is an external sub and rh not, or
  • lh is a forced sub and ("original stream's language" was selected or subtitles are off) and audio stream language matches sub language and rh not, or
  • lh is a default sub and ("original stream's language" was selected or subtitles are off) and audio stream language matches sub language and rh not, or
  • lh is a sub where audio stream language matches sub language and (original stream's language" was selected or subtitles are off) and rh not, or - lh is a forced sub and a default sub ("original stream's language" was selected or subtitles are off) - lh is an external sub and its language matches the preferred subtitle's language (unequal to "original stream's language") and rh not, or - lh is language matches the preferred subtitle's language (unequal to "original stream's language") and rh not, or
  • lh is a default sub and rh not

Constructor & Destructor Documentation

◆ PredicateSubtitlePriority()

PredicateSubtitlePriority::PredicateSubtitlePriority ( const std::string & lang,
int stream,
bool ison )
inlineexplicit

Member Function Documentation

◆ operator()()

bool PredicateSubtitlePriority::operator() ( const SelectionStream & lh,
const SelectionStream & rh ) const
inline

◆ relevant()

bool PredicateSubtitlePriority::relevant ( const SelectionStream & ss) const
inline

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