browser: read tags from local songs

This commit is contained in:
Andrzej Rybczak
2012-08-29 18:45:58 +02:00
parent c14b0d3b3b
commit b77466cc38
11 changed files with 50 additions and 49 deletions

View File

@@ -30,8 +30,8 @@ struct MutableSong : public Song
{
typedef void (MutableSong::*SetFunction)(const std::string &, unsigned);
MutableSong() { }
MutableSong(Song s) : Song(s) { }
MutableSong() : m_duration(0) { }
MutableSong(Song s) : Song(s), m_duration(0) { }
virtual std::string getArtist(unsigned idx = 0) const;
virtual std::string getTitle(unsigned idx = 0) const;
@@ -60,6 +60,9 @@ struct MutableSong : public Song
const std::string &getNewURI() const;
void setNewURI(const std::string &value);
virtual unsigned getDuration() const;
void setDuration(unsigned duration);
void setTag(SetFunction set, const std::string &value, const std::string &delimiter = "");
bool isModified() const;
@@ -89,6 +92,7 @@ private:
void replaceTag(mpd_tag_type tag_type, std::string &&orig_value, const std::string &value, unsigned idx);
std::string m_uri;
unsigned m_duration;
std::map<Tag, std::string> m_tags;
};