Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2d0b429b
Commit
2d0b429b
authored
Sep 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/proxy: require libmpdclient 2.9
parent
60620d9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
15 deletions
+2
-15
NEWS
NEWS
+1
-0
configure.ac
configure.ac
+1
-1
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+0
-14
No files found.
NEWS
View file @
2d0b429b
...
...
@@ -11,6 +11,7 @@ ver 0.21 (not yet released)
- new filter syntax for "find"/"search" etc. with negation
* database
- simple: scan audio formats
- proxy: require libmpdclient 2.9
* player
- "one-shot" single mode
* input
...
...
configure.ac
View file @
2d0b429b
...
...
@@ -561,7 +561,7 @@ dnl ---------------------------------------------------------------------------
dnl -------------------------------- libmpdclient --------------------------------
MPD_ENABLE_AUTO_PKG_DEPENDS(libmpdclient, LIBMPDCLIENT,
[libmpdclient >= 2.
2
],
[libmpdclient >= 2.
9
],
[MPD client library], [libmpdclient not found], [],
[enable_database], [Database support is disabled])
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
2d0b429b
...
...
@@ -212,10 +212,8 @@ ProxySong::ProxySong(const mpd_song *song)
if
(
_mtime
>
0
)
mtime
=
std
::
chrono
::
system_clock
::
from_time_t
(
_mtime
);
#if LIBMPDCLIENT_CHECK_VERSION(2,3,0)
start_time
=
SongTime
::
FromS
(
mpd_song_get_start
(
song
));
end_time
=
SongTime
::
FromS
(
mpd_song_get_end
(
song
));
#endif
TagBuilder
tag_builder
;
...
...
@@ -299,7 +297,6 @@ SendConstraints(mpd_connection *connection, const ISongFilter &f)
return
mpd_search_add_uri_constraint
(
connection
,
MPD_OPERATOR_DEFAULT
,
u
->
GetValue
().
c_str
());
#if LIBMPDCLIENT_CHECK_VERSION(2,9,0)
}
else
if
(
auto
b
=
dynamic_cast
<
const
BaseSongFilter
*>
(
&
f
))
{
if
(
mpd_connection_cmp_server_version
(
connection
,
0
,
18
,
0
)
<
0
)
/* requires MPD 0.18 */
...
...
@@ -308,7 +305,6 @@ SendConstraints(mpd_connection *connection, const ISongFilter &f)
return
mpd_search_add_base_constraint
(
connection
,
MPD_OPERATOR_DEFAULT
,
b
->
GetValue
());
#endif
}
else
return
true
;
}
...
...
@@ -326,7 +322,6 @@ SendConstraints(mpd_connection *connection, const SongFilter &filter)
static
bool
SendConstraints
(
mpd_connection
*
connection
,
const
DatabaseSelection
&
selection
)
{
#if LIBMPDCLIENT_CHECK_VERSION(2,9,0)
if
(
!
selection
.
uri
.
empty
()
&&
mpd_connection_cmp_server_version
(
connection
,
0
,
18
,
0
)
>=
0
)
{
/* requires MPD 0.18 */
...
...
@@ -335,7 +330,6 @@ SendConstraints(mpd_connection *connection, const DatabaseSelection &selection)
selection
.
uri
.
c_str
()))
return
false
;
}
#endif
if
(
selection
.
filter
!=
nullptr
&&
!
SendConstraints
(
connection
,
*
selection
.
filter
))
...
...
@@ -615,11 +609,9 @@ Visit(struct mpd_connection *connection,
std
::
chrono
::
system_clock
::
time_point
mtime
=
std
::
chrono
::
system_clock
::
time_point
::
min
();
#if LIBMPDCLIENT_CHECK_VERSION(2,9,0)
time_t
_mtime
=
mpd_directory_get_last_modified
(
directory
);
if
(
_mtime
>
0
)
mtime
=
std
::
chrono
::
system_clock
::
from_time_t
(
_mtime
);
#endif
if
(
visit_directory
)
visit_directory
(
LightDirectory
(
path
,
mtime
));
...
...
@@ -785,13 +777,7 @@ gcc_pure
static
bool
ServerSupportsSearchBase
(
const
struct
mpd_connection
*
connection
)
noexcept
{
#if LIBMPDCLIENT_CHECK_VERSION(2,9,0)
return
mpd_connection_cmp_server_version
(
connection
,
0
,
18
,
0
)
>=
0
;
#else
(
void
)
connection
;
return
false
;
#endif
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment