17 #include <unordered_map>
80 using MixMap = std::unordered_map<std::string, MixItem>;
82 bool automatic_mode =
false;
83 bool anyone_listening =
false;
93 std::function<void (
bool automatically,
const char *explanation)>
mixChanged;
108 void updatePlaylists ();
112 void pushPlaylistSelections (
Media::Source *
const source =
nullptr);
113 bool recalculatePlaylists ();
116 void automatic (
bool automatic_playlists);
A template class to manage callback, delegate and notification functions.
Definition: callback.h:21
Class to map between enumerations and their text values.
Definition: lookup.h:30
Generic data type.
Definition: parsnip.h:81
std::vector< const char * > Definitions
Definition: parsnip_command.h:90
std::vector< Definition > Definitions
Definition: parsnip_command.h:117
int CommandId
Definition: parsnip_command.h:109
Connection to a pianod client, along with context and state of that connection.
Definition: connection.h:54
Interpreter class based on Parsnip template, customized base for pianod interpreters with the additio...
Definition: interpreter.h:101
Base class for playlists, but still a MusicThingie.
Definition: musictypes.h:416
std::map< std::string, CommandId > CommandIds
Definition: interpreter.h:59
Pianod service, a customized FootballService for Pianod connections.
Definition: connection.h:115
A response collector/aggregator.
Definition: response.h:197
Type combining RESPONSE_CODE with a value or explanation:
Definition: response.h:49
A container for holding songs.
Definition: retainedlist.h:328
CallbackManager< Tuner, Callbacks > callback
Definition: tuner.h:95
MixMap mix
Definition: tuner.h:81
bool automatic() const
Definition: tuner.h:115
PianodService * service
Definition: tuner.h:75
std::unordered_map< std::string, MixItem > MixMap
Definition: tuner.h:80
AutotuneSettings autotune
Definition: tuner.h:86
Essential data structures and support.
#define CMD_RANGE_TUNING
Definition: fundamentals.h:338
std::vector< const class User * > UserList
Definition: fundamentals.h:348
pianod command processing.
Playlist / Artist / Album / Song data types.
Store and maintain mixes and perform autotuning.
Definition: mediamanager.h:33
const Parsnip::Parser::Definitions & parser_definitions()
Definition: tuner.cpp:484
TUNERCOMMAND
Definition: tuner.h:43
@ SELECTIONMETHOD
Set manner in which queue is populated.
Definition: tuner.h:50
@ MIXEXCLUDED
List playlists excluded from the mix.
Definition: tuner.h:45
@ PLAYLISTLIST
List playlists matching a predicate.
Definition: tuner.h:47
@ AUTOTUNEGETMODE
Retrieve autotuning mode and parameters.
Definition: tuner.h:49
@ MIXADJUST
Set a specific mix of playlists.
Definition: tuner.h:46
@ MIXINCLUDED
List playlists included in the mix.
Definition: tuner.h:44
@ AUTOTUNESETMODE
Set autotuning mode and configure parameters.
Definition: tuner.h:48
const PianodSchema::CommandIds & json_request_names()
Retrieve names for our JSON requests.
Definition: tuner.cpp:508
const Parsnip::OptionParser::Definitions & autotuning_option_parser_definitions()
Definition: tuner.cpp:428
constexpr float ratingAsFloat(Rating rating)
Convert from a ratings enumeration to a floating-point star-rating.
Definition: ratings.h:39
Smart pointers for music thingie types.
Autotuning mode and parameters, defining which users to consider and how to decide whether a playlist...
Definition: tuner.h:55
float veto_threshold
Below this, an individual rating omits playlist.
Definition: tuner.h:58
float quality_margin
How close average rating must be to best to include other playlists.
Definition: tuner.h:62
bool flag
If true, consider users' presence attribute when autotuning.
Definition: tuner.h:57
bool login
If true, consider users in room when autotuning.
Definition: tuner.h:56
int quantity_goal
Number of playlists to include.
Definition: tuner.h:61
float rejection_threshold
Below this, an average rating omits playlist.
Definition: tuner.h:59
float inclusion_threshold
At or above this, an average rating includes playlist.
Definition: tuner.h:60
std::function< void()> playlistsChanged
Callback sent when list of playlists has changed.
Definition: tuner.h:91
std::function< void(bool automatically, const char *explanation)> mixChanged
Callback sent when mix has changed.
Definition: tuner.h:93
Retainer< PianodPlaylist * > playlist
Definition: tuner.h:77
CartsVerb
Verb possibilities for inclusion/exclusion (CARTS) actions.
Definition: tuner.h:28
const LookupTable< CartsVerb > CartsWord
Lookup table for inclusion/exclusion (CARTS) actions.
Definition: tuner.cpp:36