use common interface for adding item(s) to playlist

this also removes a few code duplications.
This commit is contained in:
Andrzej Rybczak
2009-08-09 15:51:24 +02:00
parent f5fc2dbe8a
commit ea1edd4d4a
6 changed files with 107 additions and 313 deletions

View File

@@ -62,6 +62,9 @@ class Playlist : public Screen< Menu<MPD::Song> >
void UpdateTimer() { time(&itsTimer); }
time_t Timer() const { return itsTimer; }
bool Add(const MPD::Song &s, bool in_playlist, bool play);
bool Add(const MPD::SongList &l, bool play);
static std::string SongToString(const MPD::Song &, void *);
static std::string SongInColumnsToString(const MPD::Song &, void *);