From b9eeb6e6eb1818c591634abf5e25e6a8bb8e89fd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 23 Jun 2014 08:57:51 +0200 Subject: db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3 --- src/db/plugins/ProxyDatabasePlugin.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/db') 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)); -- cgit v1.2.3