db/proxy: require MPD 0.20 or later
Allows using ranges, always. This is required to fix https://github.com/MusicPlayerDaemon/MPD/issues/1130 without adding more runtime conditionals.
This commit is contained in:
parent
a2bdac571a
commit
4fc08e39b4
2
NEWS
2
NEWS
|
@ -2,6 +2,8 @@ ver 0.23 (not yet released)
|
||||||
* protocol
|
* protocol
|
||||||
- new command "getvol"
|
- new command "getvol"
|
||||||
- show the audio format in "playlistinfo"
|
- show the audio format in "playlistinfo"
|
||||||
|
* database
|
||||||
|
- proxy: require MPD 0.20 or later
|
||||||
* output
|
* output
|
||||||
- pipewire: new plugin
|
- pipewire: new plugin
|
||||||
- snapcast: new plugin
|
- snapcast: new plugin
|
||||||
|
|
|
@ -414,7 +414,6 @@ SendConstraints(mpd_connection *connection, const DatabaseSelection &selection)
|
||||||
|
|
||||||
#if LIBMPDCLIENT_CHECK_VERSION(2, 10, 0)
|
#if LIBMPDCLIENT_CHECK_VERSION(2, 10, 0)
|
||||||
if (selection.window != RangeArg::All() &&
|
if (selection.window != RangeArg::All() &&
|
||||||
mpd_connection_cmp_server_version(connection, 0, 20, 0) >= 0 &&
|
|
||||||
!mpd_search_add_window(connection, selection.window.start,
|
!mpd_search_add_window(connection, selection.window.start,
|
||||||
selection.window.end))
|
selection.window.end))
|
||||||
return false;
|
return false;
|
||||||
|
@ -507,11 +506,11 @@ 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, 20, 0) < 0) {
|
||||||
const unsigned *version =
|
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 "
|
throw FormatRuntimeError("Connect to MPD %u.%u.%u, but this "
|
||||||
"plugin requires at least version 0.19",
|
"plugin requires at least version 0.20",
|
||||||
version[0], version[1], version[2]);
|
version[0], version[1], version[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue