This commit is contained in:
Andrzej Rybczak
2009-02-17 08:29:40 +01:00
parent 7c936d8eaf
commit 32bac776e7
11 changed files with 31 additions and 47 deletions

View File

@@ -25,7 +25,8 @@ using namespace MPD;
using std::string;
const char *playlist_max_message = "playlist is at the max size";
const char *MPD::Message::PartOfSongsAdded = "Only part of requested songs' list added to playlist!";
const char *MPD::Message::FullPlaylist = "Playlist is full!";
Connection::Connection() : isConnected(0),
itsErrorCode(0),
@@ -486,7 +487,7 @@ int Connection::AddSong(const string &path)
}
else
if (itsErrorHandler)
itsErrorHandler(this, MPD_ACK_ERROR_PLAYLIST_MAX, playlist_max_message, NULL);
itsErrorHandler(this, MPD_ACK_ERROR_PLAYLIST_MAX, Message::FullPlaylist, NULL);
}
return id;
}
@@ -627,7 +628,7 @@ bool Connection::CommitQueue()
mpd_finishCommand(itsConnection);
UpdateStatus();
if (GetPlaylistLength() == itsMaxPlaylistLength && itsErrorHandler)
itsErrorHandler(this, MPD_ACK_ERROR_PLAYLIST_MAX, playlist_max_message, NULL);
itsErrorHandler(this, MPD_ACK_ERROR_PLAYLIST_MAX, Message::FullPlaylist, NULL);
retval = !itsQueue.empty();
}
ClearQueue();