From c2e4fe983da690907316dac9cd1838fc713dec1b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Aug 2012 21:20:24 +0200 Subject: Song: add function song_equals() decoder_is_current_song() now recognizes different instances of the same physical song. --- src/song.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/song.h') diff --git a/src/song.h b/src/song.h index 1834b36e..366ffc1a 100644 --- a/src/song.h +++ b/src/song.h @@ -21,6 +21,7 @@ #define MPD_SONG_H #include "util/list.h" +#include "gcc.h" #include #include @@ -100,6 +101,13 @@ song_is_file(const struct song *song) return song_in_database(song) || song->uri[0] == '/'; } +/** + * Returns true if both objects refer to the same physical song. + */ +gcc_pure +bool +song_equals(const struct song *a, const struct song *b); + bool song_file_update(struct song *song); -- cgit v1.2.3