--- a/src/upmpd.cxx
+++ b/src/upmpd.cxx
@@ -275,6 +275,8 @@
string iconpath;
string cachedir;
+ string onstart;
+ string onstop;
if (!g_configfilename.empty()) {
ConfSimple config(g_configfilename.c_str(), 1, true);
if (!config.ok()) {
@@ -306,6 +308,8 @@
config.get("iconpath", iconpath);
config.get("presentationhtml", presentationhtml);
config.get("cachedir", cachedir);
+ config.get("onstart", onstart);
+ config.get("onstop", onstop);
if (!(op_flags & OPT_i)) {
config.get("upnpiface", iface);
if (iface.empty()) {
@@ -435,7 +439,7 @@
MPDCli *mpdclip = 0;
int mpdretrysecs = 2;
for (;;) {
- mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword);
+ mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword, onstart, onstop);
if (mpdclip == 0) {
LOGFAT("Can't allocate MPD client object" << endl);
return 1;