aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/ProxyDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-23 08:57:51 +0200
committerMax Kellermann <max@duempel.org>2014-06-23 09:17:35 +0200
commit4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6 (patch)
treee9e80fa985a022476cf1206d618592f2034d4591 /src/db/ProxyDatabasePlugin.cxx
parent4f61ba766d5e3e94df3584d7e33e9a9f4452ca67 (diff)
downloadmpd-4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6.tar.gz
mpd-4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6.tar.xz
mpd-4c8a5dfb0522b0ff7d6acb96fd2fbc33c22c14e6.zip
db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3
Diffstat (limited to 'src/db/ProxyDatabasePlugin.cxx')
-rw-r--r--src/db/ProxyDatabasePlugin.cxx5
1 files changed, 5 insertions, 0 deletions
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));