Commit 4c8a5dfb authored by Max Kellermann's avatar Max Kellermann

db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3

parent 4f61ba76
ver 0.18.12 (not yet released) ver 0.18.12 (not yet released)
* database
- proxy: fix build failure with libmpdclient 2.2
ver 0.18.11 (2014/05/12) ver 0.18.11 (2014/05/12)
* decoder * decoder
......
...@@ -398,8 +398,13 @@ Convert(const struct mpd_song *song) ...@@ -398,8 +398,13 @@ Convert(const struct mpd_song *song)
Song *s = Song::NewDetached(mpd_song_get_uri(song)); Song *s = Song::NewDetached(mpd_song_get_uri(song));
s->mtime = mpd_song_get_last_modified(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->start_ms = mpd_song_get_start(song) * 1000;
s->end_ms = mpd_song_get_end(song) * 1000; s->end_ms = mpd_song_get_end(song) * 1000;
#else
s->start_ms = s->end_ms = 0;
#endif
TagBuilder tag; TagBuilder tag;
tag.SetTime(mpd_song_get_duration(song)); tag.SetTime(mpd_song_get_duration(song));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment