summaryrefslogtreecommitdiff
path: root/src/mpdpp.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-08-14 16:09:45 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-08-14 16:09:45 +0200
commitbab756c57952238bfcd306f1e3a6e6f42f4338c6 (patch)
tree4fd2370b605a60ec16139b6e9ab38a1e0ba64194 /src/mpdpp.cpp
parentd51edfd262bb11845fa026004549c81e8aa6b716 (diff)
add support for priorities (queueing)
Diffstat (limited to 'src/mpdpp.cpp')
-rw-r--r--src/mpdpp.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mpdpp.cpp b/src/mpdpp.cpp
index 7a2e82af..285d0573 100644
--- a/src/mpdpp.cpp
+++ b/src/mpdpp.cpp
@@ -839,6 +839,22 @@ void MPD::Connection::SetCrossfade(unsigned crossfade)
}
}
+bool MPD::Connection::SetPriority(const Song &s, int prio)
+{
+ if (!itsConnection)
+ return false;
+ if (!isCommandsListEnabled)
+ {
+ GoBusy();
+ return mpd_run_prio_id(itsConnection, prio, s.GetID());
+ }
+ else
+ {
+ assert(!isIdle);
+ return mpd_send_prio_id(itsConnection, prio, s.GetID());
+ }
+}
+
int MPD::Connection::AddSong(const std::string &path, int pos)
{
if (!itsConnection)