Commit b9eeb6e6 authored by Max Kellermann's avatar Max Kellermann

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

parent d5fa2af3
...@@ -187,8 +187,13 @@ ProxySong::ProxySong(const mpd_song *song) ...@@ -187,8 +187,13 @@ ProxySong::ProxySong(const mpd_song *song)
real_uri = nullptr; real_uri = nullptr;
tag = &tag2; tag = &tag2;
mtime = mpd_song_get_last_modified(song); mtime = mpd_song_get_last_modified(song);
#if LIBMPDCLIENT_CHECK_VERSION(2,3,0)
start_ms = mpd_song_get_start(song) * 1000; start_ms = mpd_song_get_start(song) * 1000;
end_ms = mpd_song_get_end(song) * 1000; end_ms = mpd_song_get_end(song) * 1000;
#else
start_ms = end_ms = 0;
#endif
TagBuilder tag_builder; TagBuilder tag_builder;
tag_builder.SetTime(mpd_song_get_duration(song)); tag_builder.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