diff options
author | Max Kellermann <max@duempel.org> | 2012-08-09 21:20:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-15 23:06:59 +0200 |
commit | c2e4fe983da690907316dac9cd1838fc713dec1b (patch) | |
tree | dee356597f2d63fe66c92b6a49a7ada1e75010e4 /src/song.h | |
parent | 81e898375bed0eeed43170629972d8cbc8e4231e (diff) | |
download | mpd-c2e4fe983da690907316dac9cd1838fc713dec1b.tar.gz mpd-c2e4fe983da690907316dac9cd1838fc713dec1b.tar.xz mpd-c2e4fe983da690907316dac9cd1838fc713dec1b.zip |
Song: add function song_equals()
decoder_is_current_song() now recognizes different instances of the
same physical song.
Diffstat (limited to '')
-rw-r--r-- | src/song.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/song.h b/src/song.h index 1834b36ed..366ffc1a1 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 <stddef.h> #include <stdbool.h> @@ -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); |