aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/song.h b/src/song.h
index c20bae270..b5f316955 100644
--- a/src/song.h
+++ b/src/song.h
@@ -25,18 +25,12 @@
#define SONG_BEGIN "songList begin"
#define SONG_END "songList end"
-enum song_type {
- SONG_TYPE_FILE = 1,
- SONG_TYPE_URL = 2
-};
-
#define SONG_FILE "file: "
#define SONG_TIME "Time: "
struct client;
typedef struct _Song {
- enum song_type type;
struct tag *tag;
struct _Directory *parentDir;
time_t mtime;
@@ -44,10 +38,9 @@ typedef struct _Song {
} mpd_packed Song;
Song *
-song_alloc(const char *url, enum song_type type, struct _Directory *parent);
+song_alloc(const char *url, struct _Directory *parent);
-Song *newSong(const char *url, enum song_type type,
- struct _Directory *parentDir);
+Song *newSong(const char *url, struct _Directory *parentDir);
void freeSong(Song *);
@@ -63,4 +56,9 @@ int updateSongInfo(Song * song);
*/
char *get_song_url(char *path_max_tmp, Song * song);
+static inline int song_is_file(const Song *song)
+{
+ return !!song->parentDir;
+}
+
#endif