aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins
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 08:57:51 +0200
commitb9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd (patch)
treeab9e16c63e025c6c040cb7ff0240bfd6ee46f9fa /src/db/plugins
parentd5fa2af35300fc6f051d789dd310dad70014cf06 (diff)
downloadmpd-b9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd.tar.gz
mpd-b9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd.tar.xz
mpd-b9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd.zip
db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3
Diffstat (limited to 'src/db/plugins')
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx
index 368f0c8f7..1ef281e23 100644
--- a/src/db/plugins/ProxyDatabasePlugin.cxx
+++ b/src/db/plugins/ProxyDatabasePlugin.cxx
@@ -187,8 +187,13 @@ ProxySong::ProxySong(const mpd_song *song)
real_uri = nullptr;
tag = &tag2;
mtime = mpd_song_get_last_modified(song);
+
+#if LIBMPDCLIENT_CHECK_VERSION(2,3,0)
start_ms = mpd_song_get_start(song) * 1000;
end_ms = mpd_song_get_end(song) * 1000;
+#else
+ start_ms = end_ms = 0;
+#endif
TagBuilder tag_builder;
tag_builder.SetTime(mpd_song_get_duration(song));