--- a/src/main.cxx
+++ b/src/main.cxx
@@ -244,6 +244,7 @@
string cachedir;
string onstart;
+ string onplay;
string onstop;
string onvolumechange;
if (!g_configfilename.empty()) {
@@ -282,6 +283,7 @@
g_config->get("presentationhtml", presentationhtml);
g_config->get("cachedir", cachedir);
g_config->get("onstart", onstart);
+ g_config->get("onplay", onplay);
g_config->get("onstop", onstop);
g_config->get("onvolumechange", onvolumechange);
if (!(op_flags & OPT_i)) {
@@ -465,8 +467,8 @@
MPDCli *mpdclip = 0;
int mpdretrysecs = 2;
for (;;) {
- mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword, onstart, onstop,
- onvolumechange);
+ mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword, onstart, onplay,
+ onstop, onvolumechange);
if (mpdclip == 0) {
LOGFAT("Can't allocate MPD client object" << endl);
return 1;