pianod2
multisource multiuser scriptable networked music player
Classes | Enumerations | Functions | Variables
Tuner Namespace Reference

Store and maintain mixes and perform autotuning. More...

Classes

struct  PlaylistSummary
 A structure used for autotuning calculations. More...
 
struct  AutotuneSettings
 Autotuning mode and parameters, defining which users to consider and how to decide whether a playlist is included or excluded from the mix. More...
 
class  Tuner
 Tuner maintains a set of playlists and their inclusion or exclusion from the current mix, and can push it to the sources on demand (before getting random songs); this allows multiple mixes to exist. More...
 

Enumerations

enum class  PlaylistDetailLevel { NAME , DETAIL }
 
enum class  AutotuneConsiders { LOGIN , FLAG , ALL }
 
enum  TUNERCOMMAND {
  MIXINCLUDED = CMD_RANGE_TUNING , MIXEXCLUDED , MIXADJUST , PLAYLISTLIST ,
  AUTOTUNESETMODE , AUTOTUNEGETMODE , SELECTIONMETHOD
}
 

Functions

const Parsnip::OptionParser::Definitionsautotuning_option_parser_definitions ()
 
void interpret_autotune_options (const Parsnip::Data &options, AutotuneSettings *dest)
 Interpret options into the AutotuneSettings structure. More...
 
const Parsnip::Parser::Definitionsparser_definitions ()
 
const PianodSchema::CommandIdsjson_request_names ()
 Retrieve names for our JSON requests. More...
 
static ResponseCollector sendPlaylistList (PlaylistList &list, PlaylistDetailLevel format)
 Send a list of playlists. More...
 

Variables

const LookupTable< PlaylistDetailLevelPlaylistDetailLevels
 Text to enumeration values for detail level in playlist lists. More...
 
static const LookupTable< AutotuneConsidersAutotuneConsiderLookup ({ { "login", AutotuneConsiders::LOGIN }, { "flag", AutotuneConsiders::FLAG }, { "all", AutotuneConsiders::ALL } })
 

Detailed Description

Store and maintain mixes and perform autotuning.

Enumeration Type Documentation

◆ AutotuneConsiders

Enumerator
LOGIN 
FLAG 
ALL 

◆ PlaylistDetailLevel

Enumerator
NAME 
DETAIL 

◆ TUNERCOMMAND

Enumerator
MIXINCLUDED 

List playlists included in the mix.

MIXEXCLUDED 

List playlists excluded from the mix.

MIXADJUST 

Set a specific mix of playlists.

PLAYLISTLIST 

List playlists matching a predicate.

AUTOTUNESETMODE 

Set autotuning mode and configure parameters.

AUTOTUNEGETMODE 

Retrieve autotuning mode and parameters.

SELECTIONMETHOD 

Set manner in which queue is populated.

Function Documentation

◆ autotuning_option_parser_definitions()

const Parsnip::OptionParser::Definitions & Tuner::autotuning_option_parser_definitions ( )

Parse definitions for the parameter parser

Here is the caller graph for this function:

◆ interpret_autotune_options()

void Tuner::interpret_autotune_options ( const Parsnip::Data options,
AutotuneSettings dest 
)

Interpret options into the AutotuneSettings structure.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ json_request_names()

const PianodSchema::CommandIds & Tuner::json_request_names ( )

Retrieve names for our JSON requests.

Returns
Request name to command ID mappings.
Here is the caller graph for this function:

◆ parser_definitions()

const Parsnip::Parser::Definitions & Tuner::parser_definitions ( )
Here is the caller graph for this function:

◆ sendPlaylistList()

static ResponseCollector Tuner::sendPlaylistList ( PlaylistList list,
PlaylistDetailLevel  format 
)
static

Send a list of playlists.

Parameters
listThe list to send.
long_formatIf true, send playlist details. If false, send names only.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ AutotuneConsiderLookup

const LookupTable<AutotuneConsiders> Tuner::AutotuneConsiderLookup({ { "login", AutotuneConsiders::LOGIN }, { "flag", AutotuneConsiders::FLAG }, { "all", AutotuneConsiders::ALL } }) ( { { "login", AutotuneConsiders::LOGIN }, { "flag", AutotuneConsiders::FLAG }, { "all", AutotuneConsiders::ALL } }  )
static

◆ PlaylistDetailLevels

const LookupTable<PlaylistDetailLevel> Tuner::PlaylistDetailLevels
Initial value:
{
{ "names", PlaylistDetailLevel::NAME },
{ "details", PlaylistDetailLevel::DETAIL },
{ "list", PlaylistDetailLevel::DETAIL }
}

Text to enumeration values for detail level in playlist lists.