aboutsummaryrefslogtreecommitdiff
path: root/src/song.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 22:34:47 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 22:34:47 +0200
commit6d3488c8b38c07c197e97843a516868bbab7571a (patch)
tree01eb4624d2f4456eb530d87de6727b1fb13fa503 /src/song.h
parent4a7ad5b618957f75da5b305a3d0cc8006e3e7416 (diff)
song: added song_in_database()
Some functions assume that a song is not in the database when it is a remote song. Based on that, they decide whether they are responsible for freeing the song struct. Add a special function which checks whether a song is in the database (currently equal to song_is_file()).
Diffstat (limited to 'src/song.h')
-rw-r--r--src/song.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/song.h b/src/song.h
index 7d174c51..6016b8d9 100644
--- a/src/song.h
+++ b/src/song.h
@@ -68,9 +68,15 @@ char *
song_get_url(const struct song *song, char *path_max_tmp);
static inline bool
-song_is_file(const struct song *song)
+song_in_database(const struct song *song)
{
return song->parent != NULL;
}
+static inline bool
+song_is_file(const struct song *song)
+{
+ return song_in_database(song);
+}
+
#endif