diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -1,4 +1,6 @@ ver 0.18.12 (not yet released) +* database + - proxy: fix build failure with libmpdclient 2.2 ver 0.18.11 (2014/05/12) * decoder diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 00b5d445f..e41ecdec0 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -398,8 +398,13 @@ Convert(const struct mpd_song *song) Song *s = Song::NewDetached(mpd_song_get_uri(song)); s->mtime = mpd_song_get_last_modified(song); + +#if LIBMPDCLIENT_CHECK_VERSION(2,3,0) s->start_ms = mpd_song_get_start(song) * 1000; s->end_ms = mpd_song_get_end(song) * 1000; +#else + s->start_ms = s->end_ms = 0; +#endif TagBuilder tag; tag.SetTime(mpd_song_get_duration(song)); |