src/db: fitting libmpdclient interface
This commit is contained in:
parent
d751df0a73
commit
8e07ea7ad8
@ -493,9 +493,13 @@ ProxyDatabase::Connect()
|
|||||||
try {
|
try {
|
||||||
CheckError(connection);
|
CheckError(connection);
|
||||||
|
|
||||||
if (mpd_connection_cmp_server_version(connection, 0, 19, 0) < 0)
|
if (mpd_connection_cmp_server_version(connection, 0, 19, 0) < 0) {
|
||||||
throw FormatRuntimeError("Connect to MPD %s, but this plugin requires at least version 0.19",
|
const unsigned *version =
|
||||||
mpd_connection_get_server_version(connection));
|
mpd_connection_get_server_version(connection);
|
||||||
|
throw FormatRuntimeError("Connect to MPD %u.%u.%u, but this "
|
||||||
|
"plugin requires at least version 0.19",
|
||||||
|
version[0], version[1], version[2]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!password.empty() &&
|
if (!password.empty() &&
|
||||||
!mpd_run_password(connection, password.c_str()))
|
!mpd_run_password(connection, password.c_str()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user